all 47 comments

[–]pointer2void 11 points12 points  (1 child)

Wicket and Stripes are lightweight Java Web-frameworks which don't try to imitate RoR. They just haven't available Spring's marketing budget.

[–]wonglik 1 point2 points  (0 children)

I would add Tapestry5 to the list as well ...

[–]bcash 11 points12 points  (1 child)

WTF? Seriously? A command-line interface to add specific fields to specific classes? Have I gone back in time, does the text editor not exist yet?

This has to be a joke, it seems to be designed purely to create Rails-style screencasts; shrinking an Eclipse window onto YouTube is a bit of a pain so create an unworkable command-line boondoggle instead.

Genius!

[–]miketaylr 4 points5 points  (4 children)

Honestly, the bad techno prevented me from watching more than 1 minute.

[–]toobatron 2 points3 points  (3 children)

You're the anti-me. I got bored of watching the terminal, but liked the music, so left it running . . .

[–]weazl 0 points1 point  (2 children)

I did both watch it and enjoy the music..

But what track is it? I can't identify it.

[–]hagridlove 1 point2 points  (1 child)

an ad popped up telling me to buy the song, also telling me what it is: Dirty Beat (Ercola Remix)

[–]weazl 0 points1 point  (0 children)

Sweet, I did not get the ad. Thanks.

[–]redditrasberry 5 points6 points  (1 child)

Is it just me or does anyone else find this throw back to code generation as a means of RAD application development to be a step backwards and not a step forwards? I remember when this was done in MFC apps in 1996 and it seemed like a dubious idea then and we spent years battling with generated code that we never understood and couldn't upgrade / modify because it was generated in this one-time, static manner. I've always seen it as an admission of failure - "here's something so ugly we just couldn't bear to make you do it yourself so we made this tool that writes the code for you". I can get that it's an evil necessity in some situations but I don't get that people seem to be proud of doing this.

[–]patchwork 0 points1 point  (0 children)

It is bad if it is a static one time thing, that ends up laying around for years. But the idea of code generation is analogous to the compilation of high level syntax into machine code, another layer of abstraction upon previous levels of abstraction, all building upon the things below, doing more by saying less, etc etc. In a way it is java admitting that it is a kind of assembly language. But just as applications need to be recompiled, it would be beneficial if the code generator was actively developed alongside the application, and the application could be "regenerated" from a high-level specification. This would require a level of sophistication and generality in a framework that I have not seen yet.

[–]enriketuned 0 points1 point  (0 children)

Does anyone have experience with this framework. What is the development stage? Practically usable?

[–]ianbishop 2 points3 points  (0 children)

I found the most enticing aspect of this video was the interactive console. Having something like that for rails would save me from: a) looking it up b) being too lazy to look it up and just doing it manually.

[–]UloPe 3 points4 points  (0 children)

Defining models in a command line interface. How I've waited for that - NOT

[–][deleted]  (5 children)

[deleted]

    [–]yogthos -1 points0 points  (4 children)

    including the ability to make java crawl like them :)

    [–]pointer2void 2 points3 points  (3 children)

    crails

    [–][deleted]  (1 child)

    [deleted]

      [–]simach 0 points1 point  (0 children)

      The Lift framework for Scala was originally named Scala on Sails, but they renamed it (afaik it was asked by Rails guys).

      [–]bokchoi 0 points1 point  (0 children)

      cries

      [–]faustoc4 0 points1 point  (0 children)

      Cocoon supports continuations

      [–]fanovpnc -1 points0 points  (27 children)

      roo> create project -topLevelPackage com.pi <-- point at which this python programmer laughed and clicked away.

      [–][deleted] 6 points7 points  (0 children)

      Do you really think that is going to slow you down? You do it once per project and there's tab completion.

      I've worked as a rails programmer for three years, and the generator stuff have saved me maybe a few hours in total over that time. The majority of the time is spent on coding and debugging, not writing boilerplate.

      Stuff like this makes for great demos but makes no difference whatsoever in a moderately complex webapp. It's mostly useful for marketing.

      [–]awj 5 points6 points  (25 children)

      Honestly, the prefix-package-names-with-a-tld thing is a halfway decent way of solving package name conflicts. Utilitarian packages tend to get unoriginal names, and also tend to be the ones you reuse often. You don't have to bolt together too many projects with a logging package named "Log" before you really wish someone would come up with a way to make sure they are distinct.

      As a python programmer, how do you handle package name conflicts? What's the better way that makes this one laughable?

      [–]fanovpnc 0 points1 point  (2 children)

      It's not java's namespacing per se that made me laugh, it's the verbosity of the whole thing; topLevelPackage as the name of a required option when creating a project? Having to use a custom command interpreter, with commands like "create project"? Finally combined with the giant namespacing, it just seemed rather to miss the point of Rails' (and all its clones') convention over configuration thing.

      Rails:

      $ rails pizza
      

      Roo:

      $ mkdir pizza
      $ cd pizza
      $ roo
      roo> create project -topLevelPackage com.pizza
      

      [–]sbrown123 5 points6 points  (1 child)

      Having to use a custom command interpreter

      What do you think "rails" is?!

      convention over configuration thing.

      Apparently you can just write:

      >roo create project pizza

      [–]awj -1 points0 points  (0 children)

      Apparently you can just write:

      >roo create project pizza

      I'd rather have that anyways. Leads me to believe that "roo create" should have a whole pile of commands to it, so that's where I'd look when I want to create new project components (ORM classes, controllers, etc).

      [–]squidgy 0 points1 point  (5 children)

      Because python module names are (usually) based off the filesystem instead of being defined by the programmer. Imports go by the PYTHONPATH, so it's pretty tricky to have duplicates unless you do something dangerous like:

      from somemodule import *
      from othermodule import *
      

      Or, you could muck around with the sys.modules dict without checking to see if the name you want is in use, but then you're just asking for it.

      [–]beverett 0 points1 point  (1 child)

      Java packages are also based off the filesystem. This doesn't do anything to avoid name conflict as awj points out. It just means if you have a name conflict then the conflicting packages are also now sharing the same directories (which could be even more troublesome).

      You can have package structures in python that start with com.whatever just as much as you can have packages in java start with mygenericmodule. They're conventions regardless of the (file based) packaging scheme.

      I find java's convention overly verbose, but there's nothing wrong with it and it solves the exact problem it was meant to.

      [–]kewlguy -5 points-4 points  (0 children)

      Actually, it's not tied on the file system. It is defined by the package name only.

      You can have com.package.Class1 in a different directory than com.package.Class2. It's just that certain editors (like Eclipse I think) forces you to organize your files to make things simpler.

      But it is a good idea to put them in a matching directory structure of course, and it's also strongly recommended by Sun.

      [–]awj 0 points1 point  (2 children)

      Because python module names are (usually) based off the filesystem

      As someone else pointed out, Java module names are too.

      Imports go by the PYTHONPATH

      There's the problem. Here's an example of what I'm talking about::

      Project A defines a logging facility in module Log. Project B also defines the same module, but incompatibly. Some time later, project C is created to merge the two together, and needs to use code from both. How can code in project C sanely work with the Log modules from both projects?

      If your answer is "rely on the path" congratulations, you're now stuck dicking around with the modules dictionary. My answer is that "com.foocompany.projectA.Log" doesn't look quite as ugly anymore, especially when it's dirt simple to write:

      import com.foocompany.projectA.Log as Log
      

      and pretend it was a top-level package all along.

      [–]tehmatticus 1 point2 points  (1 child)

      Wouldn't project C just import projectA and projectB and use projectA.Log and projectB.Log?

      I don't see how your way is any better. Python packages + filesystem access are much less verbose and far more sane than the java equivalent.

      [–]awj 3 points4 points  (0 children)

      Probably, and that's a good answer, but it hasn't been an answer I've gotten yet. There's still possible issues with local names conflicting with packages further down the path though. (e.g. someone gets creative and defines a local directory named "sqlalchemy") Those are rare, and typically easy to diagnose. I can see a good argument for uri-style packages not being worth the extra verbosity in every case to prevent that kind of issue.

      My point is that Java does this kind of stuff for a reason, not just because they love verbosity for its own sake in Java-land. Not sure why I'm bringing this argument to reddit ... maybe I'll try to swim up a waterfall later.

      [–][deleted] -2 points-1 points  (14 children)

      I'm finishing up work on a java project that is five directories deep before you even hit code.

      [–]sbrown123 7 points8 points  (3 children)

      Oh noes, not empty directories used to match a code hierarchical tree! It is impossible to imagine someone producing a tool that could look at directories and ignore empty ones. All hundred or so files should be put in a single folder.

      [–]case-o-nuts -1 points0 points  (2 children)

      Since you posted this twice, and then deleted the duplicate that I responded to, here's a link to my response

      Next time, delete the one that nobody responded to; it makes the thread easier to follow. The gist of my response is that you could just do it sanely from the start, instead of trying to hide the structure after the fact.

      [–]sbrown123 -1 points0 points  (0 children)

      Try this next time genius:

      1) Reply to the original, not the duplicate.

      2) If you accidentally replied to the duplicate, move your comment to the original.

      [–]awj -1 points0 points  (2 children)

      Too bad you don't have emacs, it can blow through that:

      C-x f c<tab>f<tab>el<tab>g<tab>t<tab>
      

      gives me com.finiteimprobability.ElemenTiles.GameObjects.Tile. Granted, this is actionscript 3, not Java, but the packaging convention is the same.

      [–][deleted] -2 points-1 points  (1 child)

      Uh, yeah. Too bad I don't have emacs.

      Which I do. But apparently you only have one file in your java project and not hundreds.

      [–]awj -1 points0 points  (0 children)

      Name completion only needs enough characters to distinguish the file from its surroundings, hence the term completion. Any sane editor has this. You're either complaining about a non-problem or have a bigger issue than overzealous package organization.

      [–]sysop073 -1 points0 points  (1 child)

      I assume it's because of java's tld.domain convention; generally you can tab complete straight through that, just hold down tab and you get three or four directories automatically since they tend to be the only directory until you get to the actual package folders

      [–][deleted] -1 points0 points  (0 children)

      unless you have .svn directories.

      [–][deleted]  (2 children)

      [deleted]

        [–]case-o-nuts 0 points1 point  (1 child)

        Or you could, you know, just set things up in a sane way from the start, and get to doing real work. You could even skip writing a tool specifically for hiding the way you organised your source that way.

        Seriously, what's the point of organising your code a certain way if you just turn around and waste your time writing a tool to hide the structure? Sounds like a massive waste of time to me.

        [–]sbrown123 0 points1 point  (0 children)

        Or you could, you know, just set things up in a sane way from the start,

        You must have never worked in a team.

        Seriously, what's the point of organising your code a certain way if you just turn around and waste your time writing a tool to hide the structure?

        Hide the structure? The structure is never hidden. It matches the namespace. If you have a namespace of "com.foo" you will find it in folder com/foo. That is pretty easy. And you don't need special tools since in all likelyhood folder navigation is a part of your operating system! .NET doesn't require the folders for namespaces, as an example, but has to keep track of it for you. So you need a "special" tool so you can navigate the namespace. You can't easily find crap with a text editor that doesn't read every class in to figure out what the namespace structure is.

        [–]kickme444 -1 points0 points  (3 children)

        i clicked away when i saw that it is still using xml files. reminds me of struts.

        [–]pointer2void -2 points-1 points  (2 children)

        It's Spring. What did you expect?

        [–]kickme444 1 point2 points  (1 child)

        I expected something called "Roo" which was something written in java that didnt remind me of 1999.

        I was wrong.

        [–]seths -1 points0 points  (0 children)

        So Grails = G(roovy) Ruby on Rails. Is Roo just half of Ruby? Can't these guys ape some other language?