Discussions

News: Article: Refactoring a Must for Supporting Web Projects

  1. For developers, desktop application project support and continuous evolution involves a lot of effort and requires the use of specific techniques. This article looks at how the Java IDE IntelliJ IDEA provides for one of these techniques: Refactoring of both front- and back-ends of your Web projects. Egor Malyshev explains IntelliJ IDEA's three refactoring groups for evolving front-ends. He then covers the most frequently used back-end refactorings. Malyshev also goes over other features of IntelliJ IDEA including inspection and quick fix. What do you think of IntelliJ IDEA as a refactoring tool?

    Threaded Messages (6)

  2. I love Google Web Toolkit for that :) It allows me to do refactoring on everything.
  3. Idea == Brilliant[ Go to top ]

    Idea is brilliant. So elegant and easy to use too. The new 6.0 version adds better refactoring support across more resource types including Google Web Toolkit. And the new Changes tab is awesome giving you changelist support on top of CVS and subversion, and supposedly a changelist can be part of different repositories with different types (cvs and svn for example in one list)!
  4. For developers, desktop application project support and continuous evolution involves a lot of effort and requires the use of specific techniques. This article looks at how the Java IDE IntelliJ IDEA provides for one of these techniques: Refactoring of both front- and back-ends of your Web projects.

    Morozov explains IntelliJ IDEA's three refactoring groups for evolving front-ends. He then covers the most frequently used back-end refactorings. Morozov also goes over other features of IntelliJ IDEA including inspection and quick fix.

    What do you think of IntelliJ IDEA as a refactoring tool?
    After working with IDEA for a while I think that the productivity gain from using IntelliJ IDEA refactoring tools comes from realization of interconnections between various pieces that compose a JEE/Java project. IDEA 'uderstands' the dependencies between the components of your project, web application, ejb or any other. The IDE tracks these connections and applyies logic that is specific to the type of the resource being refactored and type of resources that use it. In that sense the 'Integrated' facet of the IDE is of vary high quality, and is hard to match, IMHO. With understanding that IDE is a thing of personal preference I find their ability to associate CSS elements with elements of JSP pages (that is when an identifying part of CSS object changes appropriate changes in JSP are promted for) intelligent. Same goes for Java Script source and its associations with JSP pages that use it. Or, associations of the JSP code and back end code, or web.xml for that matter. All the associations are being tracked and made sense of within the context of the technology, and when refactored maintain the validity via an automated change. Last but not least, IDEA's support for Version Control during refactoring is great. The files that being moved by the IDE will be removed/added to the version control system associated with the project. I am not associated with JetBrains in any way. I use Intellj IDEA for my personal project http://www.jdbcpersistence.org
  5. Blatant plug.[ Go to top ]

    Nice reply, spoilt by blatant plug.
  6. Using fields on JSPs (and servlets)[ Go to top ]

    Mmmm, I think I can spot an error, but I'm afraid I'm probably wrong myself so... On the "Introduce Field" section the article's author replaces a <%= request.getParameter("time" %> by this: Remember that usually a Servlet (and a JSP is just a servlet when it's running) has just one instance on the server, even if there are multiple requests accessing it (as multiple threads). So, one instance, one field value, multiple threads... So this can potentially cause a race condition and have wrong data. Anyone agree?
  7. Yep, this is a error[ Go to top ]

    - Here instance variable of servlet (to which jsp is compiled to) is declared - First thread set variable to time from first request - Second thread set variable to time from second request - Jsp outputs wrong value for thread 1. Do not ever ever ever (10 more times ever) declare instance variables of servlet/jsp. That's the rule.