A sample enterprise standard Spring application with tutotrial - java

Can someone please help me find out an enterprise standard spring application with explanation tutorial

You should clarify what your experience level is with design patterns and web development. Typically, Java EE developers use Spring and already have prior knowledge of design patterns. If you don't understand design patterns, it may make learning Spring much more difficult, and in which case you should start by learning design patterns.
If you need quick tutorials with Spring examples, I'd suggest mkyoung's site. If you need a short introduction with a book, I'd suggest Just Spring, which is only 50+ pages and easy to get through. For a more extensive Spring-MVC/Hibernate book, I found Spring Persistence with Hibernate really helpful, because you can download source code of an entire Spring webapp from their website and get hands-on experience with the code. Even if you don't buy the book, I suggest you download the source code.

Here are videos that make you write spring apps step by step...
http://www.youtube.com/watch?v=GB8k2-Egfv0&feature=relmfu

Related

Swing based application architecture

I am planning to develop a swing application for developing a large in-house software.
Features:
It should be menu based.
Modular
Secure
Can you please help in choosing the right architecture and technologies to use with Swing. Also any good sample should be helpful.
Do have a look at the NetBeans platform. It makes things a log easier. Especially for "large" applications, the module concept will help you a lot (e.g. for structuring your application)
It has a learning curve, but I think in the long run it will help you.
This article might give you an idea:
http://netbeans.dzone.com/nb-belgian-radio-monitoring-toolkit?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+zones%2Fnetbeans+%28NetBeans+Zone%29
The limited requirements you list don't really eliminate any framework options. Get a little further in your requirements and design before you determine what you need to add to Swing.
To strengthen eugener's claims, I would recommend looking into Spring Rich Client, or its successor Valkyrie RCP.
I would suggest multi-tier architecture based on Spring Framework. We had a very good experience using Spring on the client as well as in our own application server. It makes difficult tasks a lot easier.
If you are not afraid to start with a framework that is still under development (although many of its parts are now stable), you couls take a look at GUTS.
It also requires knowledge of Guice Dependency Injection library, which helps having a very clean design of the whole application.

About Java EE, Spring and Hibernate

Basically I want to learn this technology. I already know Java SE. My question is, what is a good start to learn Spring and Hibernate? Is the book Head First JSP and Servlets good or what?
My question is, where is the good start to learn Spring and Hibernate?
I'd recommend the Second of Edition of Spring in Action by Craig Wall (it covers both) and of course the Reference Documentation of Spring Framework.
Is the book Head First JSP and Servlets good or what?
It is. But not for the mentioned topics.
There are many topics under the Spring framework. The ones that I use most are - IOC, AOP, Transaction Management, and Spring JDBC. In order to grasp these concepts I used the spring website extensively and also read the Spring Recipes book. I coded the examples that were on the book and tried to convert an existing app in using the spring framework (like IOC and JDBC). The spring forum is very useful. An of course folks here at Stack Overflow are always willing to help.
I could recommend you Pro Spring 2.5 by Rob Harrop and Jan Machacek. It's quite easy to read and there are quite a lot of simple, but precise examples. And, of course, Spring has very good reference.
And if you want to know more about Hibernate, you should definetely take a look at Java Persistence with Hibernate. One of the author is Gavin King, creator of Hibernate, so while reading this book you're getting first hand knowledge.
The spring latest documentation is the good start for learning spring.
Since, spring has so many modules, you may initially get confused.
you can start spring core and can learn the rest of the modules as you go further.

Start with Java (JVM) ecosystem

I have came from another question to this one:
How can one start with Java (JVM) ecosystem? What are beginner, intermediate and advanced knowledge-bases (bags!)? To be honest Java ecosystem was always a bit confusing to me, so it would be very helpful to provide some "reference references" and "defacto tutorials" for learning (curve!) JVM.
Note: I want to use JVM with Scala (or Clojure) but not Java itself.
I am a C# developer (WPF, Windows Forms, ASP.NET, Web Services, ... like that).
The Java Tutorial is a good place to start.
Update: you have enough questions for about a dozen posts here ;-) Honestly, you should do some research yourself (Google is your friend), then ask more specific, targeted questions; that would yield better results. (e.g. I don't think anyone can answer your question regarding Swing or JavaFX without more specific details about what you are trying to achieve.) I try to give a few pointers below, about areas I know to some extent.
for servlets and other web frameworks, here is a bunch of tutorials.
Tomcat and Jetty are both application servers.
there are a lot of different web frameworks, because different people have differing preferences, ideas and style, so many have created their own framework. It can be confusing, but at least there is choice :-)
for persistence, apart from JDBC, ORM frameworks are another strong option. I use Hibernate and I can recommend it; in a bigger project it can make your life much easier. Ultimately it depends on your specific project and constraints; there is no single right choice.
AFAIK Java has no equivalent of LINQ.
See also this post for further recommendations.
Java based web applications need to run inside of a web container such as Jetty or Tomcat.
You build your app and deploy it to the container which hosts the application at runtime.
Pure/plain JDBC should only be used directly by simple applications or integration layers that do not have access to the class model.
Most applications that I have seen have used some kind of Object Relational Mapping framework which models the entities as classes at a higher level than plain old JDBC.
Popular O/R frameworks include:
hibernate
toplink
datanucleus
cayenne
For web based development, you could start with AppFuse, see the quickstart guide.
AppFuse is a templating system that generates the skeleton of an application for you.
Then look deeper into what has been generated, and see what frameworks they are using.
AppFuse lets you choose between different technology stacks, so you could compare.
I haven't seen AppFuse support for Guice or GWT.
Guice is a Dependency Injection framework, others that could be used instead are Spring or picocontainer.
Another investigative approach that you could try would be starting with AndroMDA, which is a model driven architecture framework - you start with a UML model and then generate or forward engineer a working application.
AndroMDA also lets you control the choice of the underlying framework implementations by configuring different cartridges, once again you should dig deeper to see what they are using in the generated application.
If you are looking for a basic introduction, then the Java Tutorials are nice. To do other things like Java Web Development, then your going to need to consult google for the respective technology since they vary so widely.
One book though that I highly recommend taking a look at is Java Concurrency in Practice
Yeah, it is almost impossible for new guys to get started. This is going to drive away a lot of developers, and Java is in danger of not having constant new bloods. The old farts would love that, it's great for career security, and that's why they are making Java more and more complicated.

Which framework to choose?

I was thinking which framework would be a good choice to go into. I'm focusing on java apps and tested spring, grails and seam so far. I've also looked aboard java and gave ruby on rails a try too.
In future I will be focusing on portlet development which I've gone through already without a complete framework (just hibernate).
Maybe someone could share some experiences? Or point me to a corner which I don't looked in so far?
Regards and thanks for reading ;)
If you're doing this out of curiosity and to learn something new, rather than to meet specific requirements for a specific project, maybe you'll enjoy the Play! Framework. It contains a lot of stuff from other frameworks and is designed to get you up and going very quickly, with short development cycles and not a lot of arcanae.
Their stated purpose is to be "by Web developers for Web developers". They intend to put the fun back into Web programming.
This sounds good and I've read a few nice things about it in fora and blogs, but I haven't tried it myself yet so that's all the recommendation I can give.
Grails has a plugin for developing portlets, described here.
If you consider Groovy or Grail, you might consider ZK, too. It is an Ajax framework integrated well with Groovy and Grail.
I'd say you go with a framework that targets the programming language you're most proficient in. If you already are good in Java, and you're a quick learner ( to learn Groovy ), Grails could be a good choice.
If you'd like to go with another scripting language, say Ruby/Python, then choose Rails or Django, or Pylons ( the list could go on here ).
If you're going for a Java only framework, I'd go with Spring MVC.
You should have a look at the play framework (SO question).
Finally a Java framework made by Web developers. Discover a clean alternative to bloated enterprise Java stacks. Play focuses on developer productivity and targets RESTful architectures.
I was thinking which framework would be a good choice to go into. I'm focusing on java apps and tested spring, grails and seam so far. I've also looked aboard java and gave ruby on rails a try too.
FYI - Grails is using Spring and Hibernate underneath; SEAM uses JSF and Hibernate.
Grails is the Java equivalent of RoR. It's based on the same idea: "convention over configuration".
It's also important to be clear that Spring is far more than a mere web MVC framework. It's based on DI and AOP and encompasses persistence, remoting, enterprise services, etc. It supports portlet MVC, which is a plus given your requirements.
Personally, I would recommend straight Spring over any of your choices so far if you stick with Java. It's important to know something about what's going on under the covers. If you know Spring well, Grails will be easy.
I'd use Wicket rather than Play! because Play! requires Python as a semi-dependency. With Wicket, you only need Apache and Java and thats it.
I suggest you also check out here:
http://gokhan.ozar.net/best-java-web-frameworks/

Helping a beginner for java web application

I have pretty big background of .net, and I've decided that i want to port one of my websites to Java. (now with the asp.net MVC craze, I've figured I'd better learn a more mature approach to MVC).
i've downloaded eclipse (easyeclipse distro to be exact, and am ready and willing to develop my first website in java).
i've programmed j2me application before, so i know the language and some of the framework.
can someone guide me? any advice?
Although I'm not very aware of "asp.net mvc" is all about, I would suggest you to take a look at Spring it may be interesting.
Probably is too complicated at the beginning but when you get the concept it turns out very easy to follow.
Spring has 5 core modules ( which I don't remember exactly ) but they were like:
AOP
ORM
MVC
Core
( some other I'm missing here )
The MVC part uses a lot of annotations to make life easier. There's a very big community around Spring.
Here's an introductory article about spring.
Java has a ton of frameworks you can choose from. The technology stack that I use for my Java development is either:
Spring for IoC.
Hibernate for the data layer.
Struts2 for the MVC framework.
I have also swapped out spring and used Guice for the IoC.
Spring also has MVC, but I tend to like Struts2 better.
I'd recommend looking at Grails, it lets you become comfortable with all the java libraries and frameworks like Spring, SpringMVC, Hibernate, SiteMesh, and so on but gives you a much better DSL for web applications and much more concise code with the Groovy language (think of it as Java with dynamic typing, blocks, closures, and so on).
If you'd rather stick to pure Java I'd recommend looking at the Stripes framework and the following book:
http://pragprog.com/titles/fdstr/stripes
If you interested in web applications specifically, I would recommend using MyEclipse http://www.myeclipseide.com. Basically, this is a version of eclipse with all the web server integration and functionality built in. I've been using it for a few years and it's much easier to develop with than with plain vanilla eclipse. Depending on how much your going to use it, you have to decide whether the $55 annual subscription is worth it for you.
I'm a little confused. does spring framework actually a full blown framework? doesn't Java already have a framework? (by framework i mean all those misc libraries).

Categories

Resources