I''m posting this here because I''m sure that there are a few Rails fans here who are stuck in Java land at work and willing to consider Trails as a compromise. ( Web version here: http://weblog.masukomi.org/index.pl/view/trails ) First let me set the stage I love [Rails](http://www.rubyonrails.com) but I work in a Java shop. There are two of us here but I''m the only one who knows any Ruby and we''re looking to add a couple new hires in the near term and finding a good Java geek is hard enough without trying to find one who also know Ruby. So we thought "hmm [Trails](https://trails.dev.java.net) might be a good compromise. Simple CRUD and decent default UI should get us 90% of the way there and we don''t have to teach people Ruby. What follows is my experience trying to get the crud portion of a very simple Trails app running. The kind of thing I did in 10 minutes in RoR... my first time. It assumes you know the basics of building a webapp in Java. I attempted this while watching and emulating the Trails tutorial video which uses Eclipse to make life easier. * When you download it you get everything you need: 58 jars and a decent ant script. * Now you just need to update to Java 1.5 and ant (I''ll let that slide since java''s been out for a while, not sure when the latest ant was released) Fight with your os to make it actually use the new java and ant versions (not Trails'' fault). * Now take ant-apt.jar (it came with Trails) and copy it into ant''s classpath because Eclipse doesn''t seem to pick up on it which means you can''t get Eclipse to run the ant tasks so you''re going to have to run them manually and the fact that the jar is in the lib for the thing you''re compiling does ant no good. * now configure the build.properties to tell it where tomcat is (you can''t compile, never mind run, if it can''t find tomcat) It has start jetty and stop jetty ant tasks but i don''t know how it deploys to jetty and what about the tomcat conf stuff if you''re using jetty? * follow the tutorial video, track down and configure the hibernate file that is glossed over, set up your db (also glossed over).. make a first class... * ant deploy shoves everything into a war file and starts it up... everything that is except the hibernate.cfg.xml, the lack of which causes the new webapp to fail to boot. * once you manually copy that to the correct place (after each undeploy, deploy cycle (would make way too much sense to have deploy undeploy an old deployment)) the webapp boots up and you can now load your "Welcome to trails" page...which doesn''t have any reference the class you made. It''s supposed to... it just doesn''t, which may have something to do with the fact that while hibernate successfully connected to my database it didn''t actually DO anything to it like oh.... maybe make the table that corresponds to my class like the video claims? I''m willing to configure it in the class or in the db but not both if i did that there would be no point in using a Rails clone. now.. setting aside the frustrations of getting the thing running Trails takes a fundamentally different approach to the database interaction: In Rails we make and tweak our db and everything gets reflected automagically in our classes. End of story. In Trails you make a class, define the vars, create getters and setters for all of them, add xdoclet tags for ant to pick up on to all of your getters, make sure you id getter is first, and (if you''re using default templates) order the rest of your getters to reflect the order you want them displayed in in the default layouts. Your IDE can generally make all the getters and setters for you but you''ll have to re-order them. Then you run ant which generates the new database mapping files for you via xdoclet, undeploy and deploy because all that db mapping stuff is read in at startup (i think... could be wrong on that ). Another noteworthy point is that Trails uses Tapestry for its view and as far as i can tell for the business logic too. Tapestry is an awesome tool but it''s got a steep learning curve (arguably steeper than Rails). End result? Hours and hours spent 1 class made, no tables generated, hello world page loaded...without my class info. I quit. I could have written the app with all the business logic by now if i was using rails...and that''s assuming it was my first rails app still. -- -Kate (masukomi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)
Michael Schuerig
2005-Aug-02 20:57 UTC
What makes a good geek? (was: An initial look at Trails)
On Tuesday 02 August 2005 19:28, kate rhodes wrote:> First let me set the stage I love [Rails](http://www.rubyonrails.com) > but I work in a Java shop. There are two of us here but I''m the only > one who knows any Ruby and we''re looking to add a couple new hires in > the near term and finding a good Java geek is hard enough without > trying to find one who also know Ruby.I find this argument unconvincing. I agree that, there may be all kinds of reasons to use Java and not Ruby/Rails. But any "good Java geek" should, in my opinion, first and foremost be a good programmer, including the ability to pick up a new language and framework in a reasonable time. Knowing the intricacies of Java/J2EE or any other specific technology is necessary in practice, of course, but it''s not sufficient to make a good programmer. Incidentally, I''m wondering, has Rails become hot enough to lend itself to resume-oriented programming? Michael -- Michael Schuerig This is not a false alarm mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org This is not a test http://www.schuerig.de/michael/ --Rush, Red Tide
Michael Koziarski
2005-Aug-02 22:12 UTC
Re: What makes a good geek? (was: An initial look at Trails)
> I find this argument unconvincing. I agree that, there may be all kinds > of reasons to use Java and not Ruby/Rails. But any "good Java geek" > should, in my opinion, first and foremost be a good programmer, > including the ability to pick up a new language and framework in a > reasonable time.Given that rails'' approach is modeled heavily on the good stuff from Java, and good java programmer will pick up rails in a day or so.> Incidentally, I''m wondering, has Rails become hot enough to lend itself > to resume-oriented programming?Don''t know about resumes, but definitely blog-cred-oriented programming ;) -- Cheers Koz
Michael Schuerig wrote:>On Tuesday 02 August 2005 19:28, kate rhodes wrote: > > >>First let me set the stage I love [Rails](http://www.rubyonrails.com) >>but I work in a Java shop. There are two of us here but I''m the only >>one who knows any Ruby and we''re looking to add a couple new hires in >>the near term and finding a good Java geek is hard enough without >>trying to find one who also know Ruby. >> >> > >I find this argument unconvincing. I agree that, there may be all kinds >of reasons to use Java and not Ruby/Rails. But any "good Java geek" >should, in my opinion, first and foremost be a good programmer, >including the ability to pick up a new language and framework in a >reasonable time. Knowing the intricacies of Java/J2EE or any other >specific technology is necessary in practice, of course, but it''s not >sufficient to make a good programmer. > >Let me back this comment up. I''m only 23 years old currently, and when I started programming with Rails, I was coming off of 8 months programming in Java for a class at college. That was the extent of my programming experience - outside of a QBasic class in 7th grade if you count that one :) I was reasonably comfortable within the rails framework in about two weeks. Granted, the famous Duane Johnson was my tutor/project lead, but I would not consider myself an excellent programmer by any means, and I picked it up pretty quickly. The really Ruby-heavy stuff in the models, is still a bit thick for me, because I just don''t know Ruby very well, but I can code in Rails fairly well. Anyhoo, that''s my two cents. Ben Robison _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
kate rhodes
2005-Aug-03 02:23 UTC
Re: What makes a good geek? (was: An initial look at Trails)
in my opinion a "good" programmer can pick up the basics of almost any of the modern languages in a day. For the most part the only difference between most of them is syntax.. Ruby/Java/Perl... they are all built on the same core rules and data types. There are hardly any languages alive today that vary significantly. Haskell maybe? But hiring that person isn''t so easy and justifying them spending time getting up to speed on ruby when what we really need is a Java geek to help out with the huge java codebase that is our bread and butter.... that''s hard too. We''re only 2 developers right now and our work has to pay the bills for the 3 other employees and get us in the black. We need fast java developers and it''s damn hard to justify writing a second app that only I can really maintain with any speed. Yeah, if i wasn''t there, my coworker could find his way around as could any "good" programmer. The main argument is that we want something that any of us can sit down at and enhance/bug fix/tweak without having to sit down and learn a new syntax while Java work piles up behind them. We have enough on our plates already... re Rails and Ruby on resumes: YES YES YES For exactly the same reasons Paul Graham put forward in "The Python Paradox" http://www.paulgraham.com/pypar.html and "Great Hackers" http://www.paulgraham.com/gh.html Show up to an interview with us with a resume that speaks proudly of knowing Ruby, Haskell, or any other language that corporate america has yet to start throwing haphazardly into powerpoints because it''s the buzzword du jour and you get bonus points. It shows you''re self motivated. It shows you''re willing to try new things and think for yourself. -Kate On 8/2/05, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I find this argument unconvincing. I agree that, there may be all kinds > > of reasons to use Java and not Ruby/Rails. But any "good Java geek" > > should, in my opinion, first and foremost be a good programmer, > > including the ability to pick up a new language and framework in a > > reasonable time. > > Given that rails'' approach is modeled heavily on the good stuff from > Java, and good java programmer will pick up rails in a day or so. >
On Tuesday 02 August 2005 19:28, kate rhodes wrote: > End result? Hours and hours spent 1 class made, no tables generated, > hello world page loaded...without my class info. I quit. I could have > written the app with all the business logic by now if i was using > rails...and that''s assuming it was my first rails app still. It shouldn''t be that hard. I like Ruby and Rails. After having led the creation of a much less incredible web application ''architecture'' in Ruby, which is a title too haughty for what we did, I really appreciated what I saw in Rails. I understood it very well within a few hours, at least as much as I needed to in my experimenting with it. I was hooked. When I discovered Rails, I discovered what I had been longing for in a web application framework. As I was, and still am, developing a web application in Java, I became somewhat depressed. It was hard going to work; knowing the amount and quality of features that we could be developing with Rails, while moving at a snails pace managing all the Tapestry assets, made me ill. There was only one thing to do - build something like Rails with Java. It is possible to reduce the complexity you outlined. Convention over configuration is a powerful concept that can be realized, to a degree, even in a statically typed language like Java. There is ''enough'' reflection. You can''t think like a Java programmer more than you think like a Ruby programmer. So, with fear and trembling I finally introduce Sails. It is running in a production environment but in need of lots of work. I invite anyone curious enough to learn more to communicate with me through sails-rMHxjOMBamphh9+rSnkgNQ@public.gmane.org You may also visit http://www.javaonsails.org, where there is a link to an instiki. I only ask that folks keep non-constructive criticism to themselves, as this will distract us from our real goal: being productive in the environment we are in. (blip...) adam williams +++++++++++++ "The American people will never knowingly adopt Socialism. But under the name of ''liberalism'' they will adopt every fragment of the Socialist program, until one day America will be a Socialist nation, without knowing how it happened." - Socialist Party presidential candidate Norman Thomas
[snip good stuff]> So, with fear and trembling I finally introduce Sails. It is > running in a production environment but in need of lots of > work. I invite anyone curious enough to learn more to > communicate with me through sails-rMHxjOMBamphh9+rSnkgNQ@public.gmane.org You may > also visit http://www.javaonsails.org, where there is a link > to an instiki. I only ask that folks keep non-constructive > criticism to themselves, as this will distract us from our > real goal: being productive in the environment we are in.Wow. Y''know, it''s no surprise that DHH won an award tonight when you have PHP, Python, and now Java taking inspiration from Rails. So, in that spirit, you go Java-on-Sails, brother! I hope your framework kicks butt, too. [by the way, great logo, too]
Dean Matsueda wrote:> Wow. Y''know, it''s no surprise that DHH won an award tonight when you > have PHP, Python, and now Java taking inspiration from Rails.<shameless evagelism> Don''t forget MonoRail from http://www.castleproject.org/! It is a Rails lovers'' home away from home when working in .NET. </shameless evagelism>
+1, From those who must develop in Java, even when we would rather not, we salute you :)>So, in that spirit, you go Java-on-Sails, brother! I hope your >framework kicks butt, too. > >-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.0/63 - Release Date: 8/3/2005