Cool, the more the merrier. I'll be sure to fire off any questions that
I have since I know they'll come up.
The 2 actions I've migrated so far are pretty simple, so there wasn't a
whole lot that I had to work through for them. Once I start getting
into some of the more complicated actions I'm sure there will be more
interesting decisions to make.
Right now I am thinking of some ways to streamline the process for
accessing data and doing operations which are basically required for all
actions. For example, in pretty much every action we have a test like
this ...
if(rollerSession.isAuthorizedToXXX(user, perms)) {
// do action work
} else {
// denied
}
... i want to separate out logic like that into interceptors or some
other way so that the actions get that work for free and don't have to
duplicate that code all over the place. same goes for things like
looking up the authenticated user and working weblog, which basically
all actions require.
i think i have some good ideas so far, but once i figure out which ideas
i think are best i can run them by the list and see if others agree.
-- Allen
Matt Raible wrote:
> I'd love to help with this migration, but unfortunately have too much
> on my plate to do anything. Since I've already done a Struts 1 ->
> Struts 2 migration on a couple projects, hopefully I can help w/ any
> questions you might have. From the looks of it, you've probably
> figured most things out.
>
> Matt
>
> On 4/16/07, Allen Gilliland <[EMAIL PROTECTED]> wrote:
>> I've spent a little time looking at this more closely and I've got a
>> couple of the more basic actions migrated and so far everything is
>> looking good and I don't think we'll have any problems running struts1
>> and struts2 side-by-side while we migrate.
>>
>> I'd like to commit the work that I have so far which changes the login
>> and registration pages to use struts2. I've setup the migration
process
>> (so far) in such a way that all of the struts2 code is basically
copied
>> and modified versions of the struts1 stuff, so there is basically no
>> replacement or modifications. This way it's easy to see the two
side by
>> side while we work and we can easily switch between struts1 and
struts2
>> if that were ever necessary.
>>
>> So if nobody objects I'd like to commit my initial struts2 support
>> tomorrow. The commit list is this ...
>>
>> M metadata/xdoclet/global-forwards.xml
>> M metadata/xdoclet/servlet-mappings.xml
>> M metadata/xdoclet/filter-mappings.xml
>> M metadata/xdoclet/filters.xml
>> A src/org/apache/roller/ui/core/MigratingUIModel.java
>> A src/org/apache/roller/ui/core/struts2
>> A src/org/apache/roller/ui/core/struts2/LoginAction.java
>> A src/org/apache/roller/ui/core/struts2/RegisterForm.java
>> A src/org/apache/roller/ui/core/struts2/UIActionSupport.java
>> A
>> src/org/apache/roller/ui/core/struts2/MigratingUIActionSupport.java
>> A src/org/apache/roller/ui/core/struts2/RegisterFormBean.java
>> M src/org/apache/roller/ui/core/struts/actions/LoginAction.java
>> M src/org/apache/roller/ui/core/struts/actions/UserNewAction.java
>> A src/org/apache/roller/ui/core/util/UIUtils.java
>> A src/org/apache/roller/ui/core/UIModel.java
>> M build.xml
>> A tools/struts-2.0.5/lib/tiles-api-2.0-20070130.184344-3.jar
>> A tools/struts-2.0.5/lib/struts2-tiles-plugin-2.0.5.jar
>> A tools/struts-2.0.5/lib/tiles-core-2.0-20070130.184344-3.jar
>> M properties.xmlf
>> A web/WEB-INF/jsps/tiles/struts2
>> A web/WEB-INF/jsps/tiles/struts2/tiles-mainmenupage.jsp
>> A web/WEB-INF/jsps/tiles/struts2/menu-editor.jsp
>> A web/WEB-INF/jsps/tiles/struts2/menu-admin.jsp
>> A web/WEB-INF/jsps/tiles/struts2/tiles-tabbedpage.jsp
>> A web/WEB-INF/jsps/tiles/struts2/css-nosidebar.jsp
>> A web/WEB-INF/jsps/tiles/struts2/footer.jsp
>> A web/WEB-INF/jsps/tiles/struts2/empty.jsp
>> A web/WEB-INF/jsps/tiles/struts2/css-sidebar.jsp
>> A web/WEB-INF/jsps/tiles/struts2/head.jsp
>> A web/WEB-INF/jsps/tiles/struts2/tiles-simplepage.jsp
>> A web/WEB-INF/jsps/tiles/struts2/tiles-errorpage.jsp
>> A web/WEB-INF/jsps/tiles/struts2/search.jsp
>> A web/WEB-INF/jsps/tiles/struts2/banner.jsp
>> A web/WEB-INF/jsps/tiles/struts2/messages.jsp
>> A web/WEB-INF/jsps/tiles/struts2/bannerStatus.jsp
>> A web/WEB-INF/jsps/tiles/struts2/title.jsp
>> A web/WEB-INF/jsps/core/struts2
>> A web/WEB-INF/jsps/core/struts2/RegisterForm.jsp
>> A web/WEB-INF/jsps/core/struts2/Login.jsp
>> A web/WEB-INF/jsps/core/struts2/Welcome.jsp
>> A web/WEB-INF/jsps/taglibs-struts2.jsp
>> M web/WEB-INF/jsps/setupBody.jsp
>> A web/WEB-INF/tiles.xml
>> M web/WEB-INF/security.xml
>> M web/WEB-INF/classes/roller.properties
>> A web/WEB-INF/classes/struts.properties
>> A web/WEB-INF/classes/struts.xml
>>
>>
>>
>> Anil Gangolli wrote:
>> >
>> > The last paragraph sounds like a good start. I'm not familiar with
>> > Struts 2 yet so won't be of much help.
>> >
>> > --a.
>> >
>> > ----- Original Message ----- From: "Allen Gilliland"
>> > <[EMAIL PROTECTED]>
>> > To: <dev@roller.apache.org>
>> > Sent: Friday, April 13, 2007 2:36 PM
>> > Subject: struts1 -> struts2 migration
>> >
>> >
>> >> we talked about this in the 4.0 planning discussions and i believe
>> >> that everyone was in agreement that starting with Roller 4.0 we
would
>> >> be moving to jdk 1.5 and introducing struts2 as the next generation
>> >> framework to replace our current struts1 stuff. since i am
planning
>> >> to do a reasonable amount of work which requires modifying or
adding
>> >> things to our authoring forms i'd really like to do them in
struts2 so
>> >> that my work isn't going to be wasted, so that means it's time
to at
>> >> least start the migration and get to a point where we start
developing
>> >> new pages and forms in struts2.
>> >>
>> >> i've started looking into this and playing around with it a
little bit
>> >> and if anyone else is interested in this then i would love to
get some
>> >> help. so far i've just done some reading on the topic and noting
down
>> >> a general strategy so if anyone has experience with this and
wants to
>> >> help, please let me know.
>> >>
>> >> right now i think my initial goal is to get the app configured
so that
>> >> struts1 and struts2 actions and forms can run side by side, and
then i
>> >> want to migrate a small set of the existing actions to detail the
>> >> process.
>> >>
>> >> -- Allen
>> >>
>> >
>>
>
>