Thursday, April 30, 2009

Java Web Development - Shopping Cart Tutorial

I have written a number of tutorials covering a whole range of topics, patterns, technologies and frameworks regarding developing Java web applications. Over the next couple of days and weeks I will be posting these tutorials on my blog. They are primarily intended for junior Java developers who would like a smooth and relatively easy introduction into building web applications.

I have purposefully kept every topic as simple as possible in order to not over complicate matters. The reason for this was to try and give you a base to work from so that you can be up and running as quickly as possible without feeling too overwhelmed.

Why would I recommend these tutorials of mine when there are many similar tutorials like these over the internet? This is a good question and my answer to that would be the following:
  • Working examples – I have created a complete working web application that is used throughout each tutorial. The Shopping Cart application. It starts off small and as the tutorials progress the application grows. You can easily download the different versions of this application for each tutorial, import it into your Eclipse workspace, view the source and deploy it to a Tomcat server to see how it works.
  • Simple - I have tried to keep the examples I use as simple as possible without complicating issues unnecessarily. So often we are thrown into the deep end and expected to swim. We drown in the confusion and complexity. By simplifying each example I hope to give you a starting point for you to build on.
  • Best practices – I have tried to include best practices and design methodologies within each example.
  • SDLC – I follow a specific industry recognized path to take when tackling a project. Each tutorial will step you through the software development lifecycle (SDLC) of the shopping cart application.
  • Wide range – I have covered a wide range of different technologies and frameworks.
  • Online support – I am here to offer support and assistance to you as well as answer any questions you may have. But there is a catch – this is for a limited time only. If you are going through this tutorial and the year is 2030 you really should be doing something else with your time.
So what are these tutorials? Another really good question. The tutorials are broken down into the following steps:
  • Analysis – So what’s this got to do with Java hey? We’re technical people not business people so who cares about this stuff hey? Yeah I hear you…however understanding the business requirements will really ensure you know what to implement and how to implement it. Not understanding the requirements will lead you to implementing something wrong then redoing it and then smashing it done and then taping parts of it together and then you wondering why you ever got into development in the first place and wishing you can find another job to get out of the mess you created. Besides all that it is good practice and your boss would be quite impressed with you because you know what is required of you. So read and learn this tutorial it is important.
  • Design – Based on the requirements and use cases defined in the analysis tutorial we learn how to model and design are application. To top it off we also generate our main service classes from our model.
  • Test cases – It is a good idea to begin your development to write a few test cases to some of our major components. Writing test cases highlights a lot of areas that were missed in the design phase.
  • Build – We add an Ant script to our project to automate our build.
  • Web development  – Ok time to get your hands dirty. We take our design and test cases and we start to flesh out our web application. This would be the first draft of our Shopping Cart web application.
  • Facelets  – A short tutorial on using facelets to add a template to our web application so that you don’t have to have a JSP include on every single web page.
  • Hibernate  – In this tutorial we learn how to use Hibernate to persist our data to a database.
  • Spring  – We learn how Spring can be used to make our lives a lot simpler...yeah you have to learn Spring before than…arghhh but don’t worry you will see it is actually quite simple to use.
  • More test cases – We learn a little more about unit testing and integration testing. We leverage off Spring to make our lives simpler and we use mock objects to test our service layers.
  • AJAX – In this tutorial we learn how to turn our web application into a Rich Internet Application by using RichFaces and AJAX.

Bonus tutorials
I have added these extra tutorials that weren't part of the original 10 but follow on from the last one (i.e. AJAX)

I hope you find these tutorials helpful and I hope to hear back from you.
Post a Comment