Spring MVC (java web application development framework)
With the recent theme of the last few posts being Java database programming, I'll take it a step further now with integrating this into web application development with Spring.
A little research at my company confirmed that Spring MVC is approved and used (saying it is the "standard" would be a stretch though). Apparently, the jump was made from Struts 1.3 to Spring MVC at some point (no evidence any other Java MVC framework was ever used, like Struts 2), which is fine with me. There are some differences but the basic components are still there: the model (which is the object containing the data used in the view), the view, and the controller, as well as the POJO's/domain objects and DAO's/service objects. There is a little more XML configuration than with Struts 1.3 but only an extra file or two. There are ~10 libraries (jar files) necessary for the Spring MVC project.
As far as the data access level is concerned, Hibernate seems less popular at my company than previously thought, though it is used when dealing with simple table structures. Instead, I used the Spring SimpleJDBCTemplate for implementing the CRUD functions necessary for the project I created. Recall that in the last post, this was the first of three methods described. Using raw JDBC was almost impossible (and if it were possible, I would have tried to abstract it with the JDBC Template anyway). I believe that there are other templates that function similarly in use here.
I developed my project using STS 2.7.2 and it manages a list of persons that have first names, last names, salary (money amount), and state of residence. Add and edit use the same form, delete is simply a button/link on the main list page, the salary field has validation that displays an error message when blank or white space, format that error message with a CSS file, and the state field is a dropdown that queries all the states in a states table. These represent most of the tasks that I would need to do in an actual application with Spring MVC.
Once the project was built, the .war file is easily created in STS, and can then be deployed to a Tomcat or other application server where it would then run.
With tomorrow being my one year anniversary at this job, I am glad that I have been able to create a Spring/DB web application since I came into the job thinking this would be one of my main assets and responsibilities. I still aim for this to be the case, just didn't think it would take so long. Hopefully the hard and tedious part is over. I remember when applying and interviewing for these jobs that I hoped I could get into Spring and let that be my main development framework for several years after. Since Spring is still somewhat new, this could come to fruition still.
A little research at my company confirmed that Spring MVC is approved and used (saying it is the "standard" would be a stretch though). Apparently, the jump was made from Struts 1.3 to Spring MVC at some point (no evidence any other Java MVC framework was ever used, like Struts 2), which is fine with me. There are some differences but the basic components are still there: the model (which is the object containing the data used in the view), the view, and the controller, as well as the POJO's/domain objects and DAO's/service objects. There is a little more XML configuration than with Struts 1.3 but only an extra file or two. There are ~10 libraries (jar files) necessary for the Spring MVC project.
As far as the data access level is concerned, Hibernate seems less popular at my company than previously thought, though it is used when dealing with simple table structures. Instead, I used the Spring SimpleJDBCTemplate for implementing the CRUD functions necessary for the project I created. Recall that in the last post, this was the first of three methods described. Using raw JDBC was almost impossible (and if it were possible, I would have tried to abstract it with the JDBC Template anyway). I believe that there are other templates that function similarly in use here.
I developed my project using STS 2.7.2 and it manages a list of persons that have first names, last names, salary (money amount), and state of residence. Add and edit use the same form, delete is simply a button/link on the main list page, the salary field has validation that displays an error message when blank or white space, format that error message with a CSS file, and the state field is a dropdown that queries all the states in a states table. These represent most of the tasks that I would need to do in an actual application with Spring MVC.
Once the project was built, the .war file is easily created in STS, and can then be deployed to a Tomcat or other application server where it would then run.
With tomorrow being my one year anniversary at this job, I am glad that I have been able to create a Spring/DB web application since I came into the job thinking this would be one of my main assets and responsibilities. I still aim for this to be the case, just didn't think it would take so long. Hopefully the hard and tedious part is over. I remember when applying and interviewing for these jobs that I hoped I could get into Spring and let that be my main development framework for several years after. Since Spring is still somewhat new, this could come to fruition still.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home