Using Getting back up to speed on Java after 8-10 years as a starting point...
Along with updating myself with the core JDK6 features, would knowing the different components of JBoss be enough of a refresher?
Though I have about six+ years of Java development experience, it's been about five years since I've done professional Java coding.
I used to do a fair bit of work with WebLogic, but as noted earlier it's been five years...
The best "refresher" I've always found when working with a technology I haven't used in a while is to actually try to do some sort of project with it. Reading is great, but actually building something useful is even better.
I'd start by doing the following:
Download a recent version of JBoss from here.
Study the documentation, found here, chapter 12 has a lot of good info for actual application development.
Try building a simple web application using servlets, JSP's and session beans.
As far as whether "knowing the different components of JBoss be enough of a refresher to make you marketable", that depends on who's hiring. If they are looking for someone who already knows these technologies well and can hit the ground running, then probably not. But if you can find a company that judges you based on your attitude/aptitude and willingness to learn, then you may have a shot.
It's always better to have experience, but if someone is driven to learn then they'll almost always overtake the experienced person who does nothing to keep learning and keep their skills sharp. The hard part is finding a company that hires on that basis, because sadly, it's often not the case.
Good luck!
Related
I have a project whose core domain is dramatically changing. It's possible to use 50% of the core functionality from this site and just add the 50% new functionality, but I am starting to consider that maybe it might be faster to simply redo the product in Rails. Development speed is very important.
There are some things I really like about java - the performance and scalability are very good. I am not a crappy Java developer, so my apps tend to run very well - better than the Rails sites I've seen. I've always accepted the idea that people probably just throw a little more money at the problem when it comes to using Rails, which probably works itself out in the end because of the insane productivity benefits.
I am actually quite agile with Java. I know it will still take me longer to add a basic entity to the system, but I am quick at it and I don't mind it that much. At least it's easy and straight-forward to do.
What I do mind is:
having to start/stop the server just to fix a route, lazy load exception, controller is going to wrong view, etc.
putting up with the fact that unit/integration tests sometimes have different results than the production environment (because annotations on controllers can't be tested, or lazy-loading exceptions occur during asynchronous service calls, or things like that). Knowing if your Jackson is marshaling your data properly is another Tomcat-only thing because it's handled by Spring. There are lots of things that go wrong after you have tested all that you can, and this frankly annoys the crap out of me.
putting up with the occasional maven/classloader problem that doesn't rear its ugly head until you deploy into tomcat. It gives the false impression that everything is "a-okay" when you are in your IDE.
having to put more effort to do database migrations than the ruby people ever have to.
putting up with framework bugs in Spring that block (it's happened about 5 times on this project since 2009) or Hibernate. I also don't like upgrading Spring Security and having them constantly change the configuration, apis and tag libraries over and over again. This is annoying.
wasting so much time uploading 58 MB war files to the server! These take me 12 minutes to upload whenever I need to deploy changes. If I forgot to do 'mvn clean' before I upload, Spring might complain that 2 beans exist with the same name because I moved one to a new package... and then I have to re-upload the whole stupid war file again. Why isn't "clean" run by default whenever you do 'mvn package' for?!?! Sometimes these frameworks and tools use the stupidest default settings. This is just so common in the Java world.
Having to spend hour(s) to figure out where a framework wants to plug-in your own custom implementation for something. This is very annoying. You can spend 2 hours sifting through Google and crappy documentation trying to figure out how to override Spring Security's authentication mechanism for example... and then spend only 5 minutes writing the actual implementation. Of course, they wrote paragraphs upon paragraphs explaining the architecture and how awesome it is, but nobody cares. For something so common, why not just give example source code and be done with it?
Waiting 10-15 seconds for Spring to start up whenever you want to run your integration tests. This is a drag.
There are a few things I like about Java though. Role-based access is very easy to do with Spring Security. Authentication is never that big of a gain, but I like the implementation inside of Spring.
I also like Spring's form-backing objects and #ModelAttribute. These are huge wins when it comes to controllers, and I don't know if Rails can do these things. I honestly never liked passing request parameters around in every action - Spring MVC is actually a lot easier to use when it comes to this common bloat.
Being able to cache really massive structures in memory and have them stay in memory when you start the application is also highly desirable, especially for this application actually. I have an in-memory thesaurus and grammar checker that needs to get called hundreds of times per request, so in memory is pretty much the fastest option for me.
Even still, I think I could rebuild what I have in 2-3 weeks, and then add all of the new features in a few weeks using rails.
On the bright side, all of the really well-designed css, html and javascript could be ported over with very little problems.
I'd appreciate some advice on the subject before I continue.
PS: I could also go to Spring-ROO... but that would also be a considerable rework. I was never using JPA - I was using Hibernate directly. I am also not using JSP's - I am using Freemarker.
It takes more time to get good at Ruby, and Rails. I worked as an independent contractor as Spring and Hibernate expert myself, but I felt strangled by java and it's web frameworks so I decided to learn Ruby on Rails.
I would advice you to learn Ruby, from what I read you would probably master it, although get pretty frustrated with the very different way the use the ORM. I had issues with it, used to working on aggregate roots in Hibernate to the ActiveRecord one class one table kind of pattern. But hey, you could easily try out MongoDB to have some real fun.
Ruby is
less code
it's fast and scalable (slower than java on the specific tasks, but you get rid of stacks of layers.)
the problems are more often; which gem should I use. Luxorious!
a unique, big, sharing and caring open source community
nice frameworks, as Rails and Sinatra
powerful.
fun!
Would I advice you to do the project you describe in Ruby.
NO.
Not if speed of development matters. You will be slower, trust me. There's a lot to learn, it's conventions are not familiar to a java programmer and when you get stuck, lots of hours fly by.
The best option would be to hire a senior ruby developer to pair up with you and teach you. Be a good apprentice and you'll learn fast. Faster than me, I had to learn most by myself, which is really inefficient.
Good luck!
Check out Playframework. Its fun to develop, and you can use your Java experience to develop features way quicker (given than you have 2 weeks) than any other Java-based frameworks out there.
You do not have to start/stop a server. You fix the code in Eclipse and hit refresh on the browser. No dealing with WAR files till you have to actually deploy in production. Do everything from within Eclipse. Easily perform TDD process if thats what you want as you develop code. From an architecture standpoint, it is a fully stateless, RESTful framework from the get-go. Fully JPA compliant (even for NoSQL like Mongo), so you will not have to write complex JDBC code. On the front-end, it has a full featured templating engine, using Groovy as a templating language.
I can go on and on, but I'd recommend going through the site and take a look.
You should take a look at Grails.
You can continue to leverage a lot of your Java code but use a scripting language (Groovy) and many of the paradigms of Rails. E.g. lots of time saved by using convention rather than configuration.
Grails is used by some pretty big web sites E.g. BSkyB the UK satellite broadcaster.
It doesn't really help with some of the startup speed aspects. If you really prize development speed that much - get a faster machine or buy an SSD and fit in your machine. If you work for a big company - sell it to your manager as the cheaper option (E.g. buy a $2000 machine rather than spend 3 weeks rewriting something to save 10 minutes a day).
Java will scale better in the long run than Rails. The Hotspot technology in the JVM is one of the wonders of modern technology.
Also worth checking out is Tapestry5. It allows you to make code changes on the fly (no server restart required) and is easily the fastest & leanest framework to develop with in Java I've used.
I would still give Spring Roo a shot, it will the same rework as with Ruby on Rails or Grails or even less, but you will still stay with something that you are familiar with, which is often the biggest consideration
It has the scaffolding concepts of Ruby on Rails and Grails, but it gives you zero lock in code, just simple, well written (massive use of AOP is matter of taste though) of Spring + Hibernate / JPA (I think you can use Freemarker for the views, Roo has a miriad of plugins, but I'm not 100% sure)
Ive heard bits and pieces about Seam and Weld in Java 7, and am trying to figure out how they relate to Spring. Any pointers to good references appreciated.
Spring might some day become obsolete for new projects. Still, in the last X years almost every Java EE project was done with atleast a bit of Spring technology (in my experience), so there is a lot of software out there running Spring ( I am currently on a project which uses Spring 2 ) and that isn't going to change in the near future. Corporation don't change a running system just because the new Y technology is out. (As all the COBOL software laying around painfully demonstrates)
So to directly awnser your question, I believe that Spring knowledge will remain a must for many years to come.
No. As others have said Spring is more than DI and is established.
The reality is there are three entities competing (and in some cases working together) for more users/developers.
VMware aka Springsource
Redhat aka JBoss, Seam and Weld
Oracle aka Glassfish
I would like to believe that each one of these companies doesn't have an agenda but the reality is they do and they want you to use their technology. You'll often see developers (employees) of each project vehemently trash the other project. Avoid this and make your own opinion by trying each.
Spring is much more than dependency injection, although DI is at its core and many people receive no more of it.
I worked with both Seam and Spring and found a surprising number of things possible in one, but not the other. They do not cover entirely the same area. Where they do, they are both viable alternatives. Spring is actively maintained. I cannot see it die anytime soon. That was the answer to your question heading.
To address the body of your question: Sorry. I’d be interested in a succinct but in-depth comparison as well.
I am looking to start work on a brand-new project, something I've been thinking about for a while as my first independent sellable project.
It's broadly speaking a web-based service application, and my first choice, server-language is quite easy... I know Java pretty well from working on Java web-apps in the past.
However my experience doing web-apps involved JSP, Servlets and JSTL... I know the ideas behind newer technologies like Hibernate/Spring but have never used them. So we wrote our own DAOs, handled AJAX by writing special mini-JSP pages that generated XML/JSON pages, etc.
I'm not hugely into the idea that Spring/Hibernate are the 'only' or 'right' way to do any Java web-project, but they are widely used. On the other hand, not only would trying to learn these increase initial development time, but I'd be using my learning attempts to build a production system.
I remember one of Joel's early articles said (I'll paraphrase since I can't find it)
"regardless what's cool, always use
the technologies that the lead
developer (or dev team?) knows best"
I wondered what people thought about that?
ps: should this be CW?
I work as a consultant, and I've seen a lot of projects where the devs started out with servlets+JSP because that's what they knew, and it's pretty simple to get started with. However, it gives the team an opportunity/excuse to write a platform of their own, which is more fun than using someone else's and just writing an application.
As the project grows, the team reinvents more and more wheels, quite a few of which end up square. That's where I enter the picture - adding new stuff to this semi-flexible platform has become so complicated that the devs can't keep up adding features and fixing bugs without calling in reinforcements. Just to add insult to injury, the internal devs are usually the ones who get assigned to do the boring bug fixes because bug fixes require more knowledge of the gory entrails of what has become the team's proprietary persistence-and-web framework, and so those gosh-danged consultants get to do the new, fun stuff.
Now, you shouldn't use a framework just because people have been regurgitating each other's blog posts about the awesomeness of it, but you should also realize that there are very good reasons why those frameworks exist (and why they're used). If you haven't used any web frameworks at all, I'd recommend you to take Spring MVC, Wicket or whatever for a test drive. They don't solve all problems, and they do cause some of their own, but the grand total is usually a productivity increase, especially if you're making advanced user interfaces.
I have been on projects where plain JDBC has been quite sufficient for persistence, and where no more advanced web frameworks than servlets+JSP have been needed, but those projects are a minority. Without having used a framework or two, you'll never whether your project is part of that minority that doesn't need one, or if it is part of the grand majority that does.
Don't try everything all at once - take on one new technology at a time.
Beware the lure of cool new frameworks! I'm currently hacking on a tiny little web app that just has a login, a few mostly static pages, and a few forms to request some information by email. It would have taken me maybe two days to do as traditional Servlet/JSP in MVC style. Instead, since there was slack in the schedule, I decided to use this project to get up to speed in Spring, Spring MVC, and Spring WebFlow. While it's quite possible that I'm just dense, it took me several weeks to get my head around the right way of doing things, I'm still not totally confident that I'm doing everything correctly, and the application is still not done. Fortunately, due to slack, I'm not in danger of the overall project schedule slipping, but I'm always asking myself if I'm going to have to scrap it and start over.
I have learned my lesson, though: next time, I won't be the one pushing a new framework unless its one I've used for production projects before. That said, I'm glad I now understand Spring (or at least I think I do) and will not hesitate to use it again next time.
So how would I learn a new framework next time? If there's a project lead (in this case I'm a project lead of a team of one, no help there) I'd use the framework that they put in place. If there isn't, or if I want to learn a framework that the project lead isn't using, I'd use it for a side project on my own time. Learning is good. Putting company work at risk by throwing untested technology at it is not so good.
I can say for sure that Spring is worth considering. It gives you as much as you can take, but it doesn't bother you with things you don't need.
For example, at the very beginning you probably need dependency injection only. Then you'll need help with database interactions and transaction management. Then you'll decide to apply MVC patter to your web-application. After that may be you'll realize that components of your system are to send JMS to each other. And so on and so forth.
For all this cases Spring has it's own simple, intuitive, light-weight solution.
When starting a new project limit the number of unfamiliar technologies / frameworks to use. Every framework takes time to learn and every framework has issues especially if not implemented correctly.
If you can I would recommend you look into the Play framework. It is a web framework for Java that focuses on developer productivity. You can choose to use Spring / Hibernate if you want but you are not bound by that. It has a very easy to learn implementation and you should be able to get a good idea within a day of playing around with it if it is what you are looking for.
It depends what the customer wants (in the world of consultancy).
You have to learn new technologies. Does the customer wants to pay for that?
Not all the caveats of the new ones are known, whereas the older ones are proven a lot more.
Of course, if everybody thought like this we would all be stuck with VB these days. You have to look for the right balance, and learn a lot yourself too so you can get an objective view on the technologies available, their up and downsides.
i personally would definitely recommend looking into spring, i've found it's saved me countless hours. hibernate is also useful if you need an ORM layer (and spring has nice integrations with hibernate too). they're certainly not the 'only' or even the 'right' way to do things (that's quite subjective) but they have both saved me time and effort, especially spring.
There is one major trap with any unknown technology. You do not know where the dragons are, and you do not know how to rub the new technology "with the hairs".
Learning that will take time, and you need to have that in your estimates. Also your estimates will most likely be too low...
I'm fairly new to programming and new to java, but I'd like to jump in the deep end with a little database driven website project. I've read quite a lot about requirements in the 'real world' requesting experience with Spring and Hibernate, so I have those installed on netbeans and a project created (if I hit run I get the default spring page). Now I just need a little guidance as to where to start designing my app (please tell me if I'm getting in a bit too over my head for a beginner!).
Should I start off with my classes? - create all my classes as they map to my database tables and decide which attributes and methods each will require?
Can anyone suggest any good books for maybe.. making a java based website from scratch (i.e. from design right through to deployment) that might be useful for a beginner?
Any help appreciated thanks.
Edit: since posting this I've found a brilliant book that fits my needs just right to get started. Firstly I tried both spring in action and hibernate in action - but found both to be a bit too heavy for my novice mind. Instead I got the Java EE 5 Development with Netbeans 6 book https://www.packtpub.com/java-ee5-development-with-netbeans-6/book and its been a great help. If you use netbeans and are in a similar position to me, I'd say pick it up!
Too over your head? Depends on what you hope to accomplish. Are you trying to create a revenue-generating site to which users will be asked to trust credit card numbers and other sensitive information? Then yeah, you're getting way ahead of yourself. Is this a tool for personal use or a toy you're throwing together primarily as a learning experience? Then I say "Pffffft!" to the notion of over-the-head-ness. Go for it.
As to where to start, I say start with whatever portion of this beast is clearest to you. Have a solid idea of what the database is going to look like? Then start with it and its supporting classes. Have a clear vision of what the guts of the code are supposed to do? Start there. Etc. And if all things are equal, I'd say start at the bottom with the database layer and work your way up -- but that's just me.
And as for the books, can't help you there, but I'm sure somebody can.
I suggest to take a look at web application frameworks such as Spring's Roo or Grails. Sadly I have no experience with Roo. But I do have some experience with Grails.
With Grails you will be working mostly with Groovy, a language similar to Python, but still using the JVM. You'll still have the option to use Java anywhere you like (I think). Grails (and maybe Roo too?) manages Spring and Hibernate for you.
As for books on Grails, I recommend "Grails in Action". I have read a little of "Grails 1.1 Web Application Development" and it also seems to be a good reference. BTW, netbeans supports Grails too.
Not trying to gut your goals, but if you are wondering whether to start with your classes, I would suggest you work on your programming skills more.
I'd suggest taking a look at Larman's "Applying UML & Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition)" as well as a book on relational database theory (you need to know how to model databases properly.)
You can try your hand at building a database driven web app, and it might give you an insight into how to do it, but you need have some programming maturity to take those skills into the non-trivial.
This is a completely personal opinion so please take it with a grain of salt: Before someone tackles the building of a data-driven application with the purpose of eventually being able to use it in non-trivial projects, that person needs to have a good exposure to programming (by good I mean a LOT, say 1-2 introductory courses, 1-2 intermediate and at least one junior-level course, perhaps a total of 15-30 credits.) Unless that person is a natural programming virtuoso, I don't see it happening otherwise.
I would suggest, if you are serious about programming, to spend a substantial amount on learning the fundamentals before tackling something like this.
Good luck.
Greetings, everyone. I consider myself to be an intermediate developer, but, to be candid, probably closer to novice than expert. In any case, I have more experience with C# and the .NET platform, but my current job has me working almost exclusively with Java. This in itself is sort of a problem, but I'm dealing with it fine and I'm not really in a position to change my role at the moment.
On the side, I am starting to work on a highly interactive, database-driven web project. I'm doing it because I feel that it's a great idea and I know that the experience of doing something like this from scratch will help me immensely.
I initially wanted to go with ASP.NET MVC and I am still leaning that direction. I'm not even sure why, but I love the community behind it and, in my opinion, Visual Studio is the best IDE around. However, doing that would be counter-productive to my current job. That brought me to Grails. Even though I realize that Groovy is not Java, it seems to be similar enough (not to mention that it runs on the JVM) that the skills I learn should still help me at my current job. The more I looked into Grails, the more I loved it, especially after having to deal with what I consider to be an extremely complex J2EE environment at work.
But with the good I found the bad. I can't help but notice that there are a lot of developers who are irritated with the amount of bugs in Grails. Being that I am starting a new project and I am fairly inexperienced, do I even want to consider Grails? Is it a liability? And what's the consensus about its longevity? I would really hate to get too involved if there is a good chance of it fading into obscurity within the next few years. And even if the bugs and longevity issues aren't a huge deal, how would you compare the ease of development of Grails with that of ASP.NET MVC? I realize this last part is highly subjective. But for the sake of comparison, let's say that someone with virtually no technical background were in the same position. Would you recommend they take a look at ASP.NET MVC or Grails?
Thanks so much. If anything needs clarified or reworded, please let me know. I sincerely hope I'm not opening a can of worms...
I am the author of this question and I can give you some shares on my own experience.
As it is stated in the question, I had no real preferences and I was opened to any technology/platform that could fulfill my requirements. After many tries of different technologies (at leats few days with PHP, Rails, ASP and Grails) and some answers from StackOverflow, I ended up with the same dilemma as yours : Grails or ASP.NET MVC ?
And I chose Grails. Why? Because of GORM. Almost only because of GORM. This is fantastic to deal only with your domain classes and have your DB schema automatically generated/updated. Of course, it has its limits but this is so powerful for querying and maintening your DB. You do not write SQL anymore and it is very easy to learn.
Now here is my 2-cents comparison of the 2 technologies:
GRAILS STRENGTHS
GORM (see above)
Complete Web Stack Framework : you can generate a website in minutes and everything is already configured
A lot to learn : You have Spring MVC, Hibernate, Sitemesh, Java, JEE, Groovy...Once you have mastered Grails you can add an additional page into your resume
Java world. Whatever you need, if it already exist in Java, you can use it.
Groovy : I really like this programming language. It takes time to get familiar but once done, you will love it.
GRAILS WEAKNESSES
Memory usage. Grails/groovy is greedy for memory and it might cost more than ASP for Web Hosting
Grails bugs : there are some and when you start a new project on a new technology, you assume that most of the problems come from you...until you find out (after 1 or 2 days) that it is a Grails bug. So my advice is to proceed by steps : test as soon as possible and don't try to twist the framework. It is rough on the edge so go after what is generally recommended. However, after 2 months, I do not encounter big problems anymore.
Debugging : due to the multiple layers of frameworks, errors are generally hidden inside tons of exception lines. Also, the only decent IDE debugger is IntelliJ but this is not as easy to debug as .NET under VS
ASP.NET MVC STRENGTHS
The community : it's HUGE ! First it is supported by Microsoft and secondly 30% of the websites out there are built in ASP.NET. You can find any snippets of code, any widgets, any AJAX components, any CMS...Grails community is very active but can you rival against millions ?
Visual Studio : I definitely agree with you : there is no better IDE. IntelliJ is very good for Grails but having using both, I prefered VS
ASP.NET MVC WEAKNESSES
The youthness of ASP.NET : this is a young framework. Built on a stable technology but young enough (less than 2 years) to have also some bugs/some bad practices. Indeed, the next version of ASP.NET MVC is strongly awaited by the community.
Microsoft : even if ASP.NET MVC is open-source, you are totally dependent on their decisions (and prices).
The Bottom Line
If you project has tight deadline and if it is crucial for you to succeed, then go for ASP (according to your background). Otherwise, give a try to Grails..don't worry, you will also succeed but it will take more time. I am also deeply convinced that Grails has just started its long journey and it has a great future (see google trends)
Update by Dmitriy: If your refer to Google Trends you have to compare the 2 of them Groovy Grails and ASP.NET MVC.
Good luck
This is something that's been pretty much asked before here...
http://74.125.155.132/search?q=cache:BpGj8RtSUIsJ:stackoverflow.com/questions/1283935/what-technology-asp-php-joomla-rails-grails-for-a-website-from-scratch+Which+technology+to+choose+%28ASP.net+or+Grails%29&cd=1&hl=en&ct=clnk&gl=us&client=firefox-a
Good Luck though!