New-age Transactional Systems - Not Your Grandpa's OLTP
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Scott Delap on Sep 19, 2006
In a new InfoQ article series, Ian Roughley looks at the task of moving applications from Struts to Struts2. The series seeks to introduce the concepts and new features available in Struts2 in order to arm developers with the knowledge needed to migrate their applications. The first article includes a walk through of the request life-cycle in Struts2, configuration, and the action differences between the old and new versions of the framework.
Read Converting to Struts2 - Part I
...Before we start the migration process, a little background to Struts2 is needed. The first part of this article will introduce Struts2, along with some of the core architectural differences that will help to conceptually put everything together. The second part will cover migrating the back-end - an in-depth look at the differences between actions; action related framework features; and action configuration. The final part of this article will address the user interface. We'll cover the architecture; talk about UI components, themes and tags; and put a new face on our application.It is not my intent to cover every migration scenario available, but rather to introduce the concepts and new features available in Struts2 by starting from a common starting point. Armed with this knowledge, migrating an application of any size should be a piece of cake!...
Using Drools? See what you're missing! Get the Power of Drools with the Assurance of Red Hat
Improve Java Garbage Collection, Runtime Execution, and JVM visibility with Zing
In today’s hyper-competitive world, later may be too late to adopt Agile development and this Roadmap for Success will help you get started. Download "Agile Development: A Manager's Roadmap for Success" now!
December 2002 -> December 2005
If you don't like the idea of string literals in your code, there is a helper interface Action available that provides the common results of "success", "none", "error", "input" and "login" as constants.
If I dont like the idea of string literals, then I would create my own helper interface. In fact, I dont like the idea of getting a helper interface just for some constants, which I may not even use. This is a domain specific thing and its place is in a domain specific model , rather than a framework.
yes - you're right.
I tend to disagree, but this is your choice. I would never place the results for an action call in a domain object, it just doesn't belong there. It has nothing to do with the domain in question, but rather what happened during the processing of an action, and what is the next step in the flow of processing actions / views.
Actually, I was wrong in my comment, and the article is correct. WebWork was forked in March 2002 and in December 2005 is was announced that Struts and WebWork would join forces.
What I meant was, that in my application, I may not have the notion of success or login etc. These terms are more application specific rather than framework specific. Just choosing a bunch of terms and adding them to the framework doesnt make sense to me. I think the choice of terminology and its interpretation is totally related to the domain/application in question
Shouldn't "org.apache.struts.action2.dispatcher.FilterDispatcher" be "org.apache.struts2.dispatcher.FilterDispatcher"?
Can Anyone send a simple application developed with struts 2 ?
so where you work, 'success' is not an option?
I agree with Karan's comment: the choice of terminology and its interpretation is totally related to the domain/application.
My reason is very simple: many applications are developed by teams from countries who speak languages different from English and that don't want use english's words to determine webflow concepts.
For example, instead of using the word 'success' I could want to use the word 'exito', spanish, or 'sucesso', portuguesse.
If we can inject the HttpServletRequest into an action, can we inject other things (e.g. a Spring bean)? The reason I ask this question is that I'm thinking of declaring a service bean in Spring which is bounded in a transaction (this feature is provided by Spring), then I have this service when I am in this action (no need to use <code>applicationContext.getBean("my service");</code>)
yes - in fact spring injection come as a plugin to the framework.
Hi,
I Just started workign with Struts2.
Here is my doubt.
Assume that i am developing a loing application where user enters username and password, i have the setter/getter methods in my action for username& password.
Form action i have to invoke the Service/DAO method, which takes a Value Object as paramater, which contains username& password.
Here is few Questions:
=> Why can't we have a seperate bean for form properties and map it to the action class.
=> If the properties are defined in Action class, what is the right place to create the Value object (in my example with username& password).
Any Suggestions....
hi
i have a jsp named "displayEmployeeRecords.jsp"
which should display the list of employee details like name , empid , salary
i have implemeted this in struts1.2.
i have implemented the action class and other xml files .
i have a Arraylist object which contains a list of EmployeeModel object
1)if Arraylist is empty then the action class should be called
to populate the ArrayList
else the ArrayList should be iterated to display its content
2)tell me how to display this using struts2.0
i have done this in struts 1.2 but i dont know how to call a Action class
in Struts1.2-> /EmployeeData.do -> will call the Action class
in Strut22.0->?
in struts 1.2 -> logic:iterate to iterate the ArrayList and display the data
in strut2.0->?
The idea of convention over configuration, I think is what is to be interpreted here, rather than the exact choice of string literals chosen for success and forward. In most conventions, actions have one of two results, success or failure. Providing "success" and "failure" as conventional string literal forwarding terms is just a convention over configuration feature, and can be overrided anyway by your choice of terminology.
Struts2: /EmployeeData.action, <s:iterator></s:iterator>
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.
Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.
Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).
Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.
Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.
16 comments
Watch Thread Reply