Posted by admin on February 23rd, 2009
Lately I’ve been reading a book called ‘Eclipse Web Tools Platform’. I had read two books on ‘Servlets & JSP’ and ‘EJB’ from Head First and I really wanted to know more about the Eclipse plugins that make it easy to develop for the Web. The book is very good written and easy to understnad. The only thing that got me frustrated in the beginning is that you really need to download the exact versions of eclipse, WTP, Derby, Tomcat, … in order to do the examples in the book. Ok, if you are experienced with these things, there wouldn’t be a problem, but I’m not that experienced. It amazes me that the Java story is unbelievable strong with dozends of open source projects, but it’s far from being user friendly if you’ve worked for two years with Microsoft technologies. I’m a senior Flex Developer, so I know that Eclipse can drive a man crazy, but still, they should do something about that. I have the feeling that after reading the book (and trying out the examples) I will be able to develop web applications with those versions of the tools. If I will install the latest versions, I’ll have to go and look on the internet to get things started.
Ok, part of it will be me being not experienced, but for instance opening a solution file in Microsoft is so easy a little child could do it. Opening projects in Eclipse is somehting else…
Anyway, I love working with Eclipse and WTP, because in Microsoft technology a lot is done for the user without knowing it is done. As a result you often don’t know what’s under the hood. When developing with Eclipse, WTP, Java, … you get to know everything. It helps me be a better programmer in .NET. It’s like playing 10 years of guitar and then learning some piano. It’s amazing how often you suddenly understand things about the guitar that you didn’t understand before.
Next chapter in the books becomes interesting. Until now it was just a quick tour, but now we’re getting into Architecture.
Ciao!
<
Posted by admin on December 25th, 2008
Try hitting Ctrl-Shift-L and you’ll see all the shortcuts available!
<
Posted by admin on December 24th, 2008
I started this year by taking over the lead of a big project for the Belgian government. The project is an e-learning environment created mainly with Flex, WebORB, .NET, MSMQ and MSSQLServer 2005. Daily hundreds of candidates go to Brussels were they are being tested by our software. Typically some 300 candidates start off at the same time to take a test.
So what have I learned this year (some of the things
):
Database
- Indexes are very important because they can speed up things a lot. However they can also be misused!!! So read about them.
- Stored Procedures made it easy to quickly write logic (transaction scripts). However it’s hard to maintain these Stored Procedures and Cache dependencies don’t work with complex Stored Procedures.
- MetaData was a very usefull mechanism to add new logic in Flex without having to change table designs.
- We also used MetaData for tags which wasn’t the best choice.
.NET
- I didn’t have a lot of experience in the beginning of this year so things kind of moved in the direction of Transaction Scripts. They aren’t a bad choice but as the project gets complexer, transaction scripts are difficult to maintain.
- SubSonic (o/r mapping tool) did it job very good but I’m not very pleased with the lack of documentation, tutorials and clear explanations. I will certainly look into nHibernate and Entity Framework and see how they work with some of the patterns described in ‘Patterns of Enterprise Application Architecture’ by Fowler. In the future the project will certainly need to be scalable so things will have to change.
- Visual Studio is a great IDE.
IIS and ASP.NET
- By default IIS recycles application pools every 29 hours (will come back to that later because this caused a lot of problems).
- HttpHandlers are great.
- Cache is a very important feature if you want to speed up your application.
Flex
- Very good choice for our client side development. Application development however is far more complex than writing web pages in .NET. If you need your code to be maintainable you need to know about design patterns, frameworks, refactoring, architecture, … Those things are mainly things you learn after having used them a couple of years.
- We now work with modules but in the future we will have to check out those shared libraries as well. Our application is now 2mb big so some kind of intelligent caching will be needed.
- Prana is great to configure your application externally. Check it out!
- The Flexbuilder Eclipse Plugin is a waste of memory and I hope Adobe tries to improve this in the future. Building our project takes far too long.
- Resource bundles could be made easier.
- Designing a Flex application is a hard thing because you really need a designer who knows some basic things about Flex.
- Implementing Pessimistic Concurrency with Messaging was a very hard one this year!
- Looking forward to create a desktop application version of our project.
WebORB
- Great product. FluorineFX is the open source alternative, but WebORB has a lot more features. Without a support plan however some things are really hard to debug.
- Authentication and Authorization is worth to take a look at, but it’s important to fully understand it.
- WebORB messaging integration with MSMQ is great to let other applications know what’s happening.
Other tools that have been very usefull are CvsDude, Trac, Mylyn, SubVersion, Charles, SQL Compare, SQL Data Compare, ant, cruisecontrol, Linq, SilverLight (very promising), Spring,…
Ciao!
<
Posted by admin on December 3rd, 2008
If you would rename your eclipse.exe to eclipseyyy.exe, make sure then to also change your eclipse.ini to eclipseyyy.ini ! Searched an hour on this one… I was changing my eclipse.ini and nothing ever changed when restarting eclipse… unitl I found the solution…
<
Posted by admin on October 25th, 2008
Yesterday I needed to uncomment multiple lines in the applicationcontext of a Prana XML. After some searching I found the Ant Task I needed: replaceregexp.
Threre were four blocks that I needed to uncomment:
XML:
-
...
-
</value>
-
<value>
-
<object class="edumatic.backoffice.view.modules.NavigationModuleInfo">
-
<property name="url"
-
value="edumatic/backoffice/view/modules/support/ManagementNavigationModule.swf" />
-
<property name="icon"
-
value="edumatic/backoffice/view/modules/support/assets/management.png" />
-
<property name="title" value="Management" />
-
<property name="pluginID" value="MANAGEMENT" />
-
</object>
-
</value>
-
<value>
-
<object
-
class="edumatic.backoffice.view.modules.ContentModuleInfo">
-
<property name="url"
-
value="edumatic/backoffice/view/modules/support/ManagementContentModule.swf" />
-
<property name="pluginID" value="MANAGEMENT" />
-
</object>
-
</value>
-
<value>
-
<object
-
class="edumatic.backoffice.view.modules.NavigationModuleInfo">
-
<property name="url"
-
value="edumatic/backoffice/view/modules/support/MetaDataNavigationModule.swf" />
-
<property name="icon"
-
value="edumatic/backoffice/view/modules/support/assets/metadata.png" />
-
<property name="title" value="Metadata" />
-
<property name="pluginID" value="METADATA" />
-
</object>
-
</value>
-
<value>
-
<object
-
class="edumatic.backoffice.view.modules.ContentModuleInfo">
-
<property name="url"
-
value="edumatic/backoffice/view/modules/support/MetaDataContentModule.swf" />
-
<property name="pluginID" value="METADATA" />
-
</object>
-
</value>
-
<value>
-
...
I couldn't just search for and replace it by because there were childnodes that had to stay uncommented.
So here are the replaceregexp tasks that made it work:
XML:
-
<replaceregexp file="${selor-salto-test-deploy-folder.dir}/backend/application-context-backoffice.xml"
-
byline="false" flags="s">
-
<regexp pattern="<value>.{1,250}ManagementNavigationModule"/>
-
<substitution expression="<!--value>
-
<object class="edumatic.backoffice.view.modules.NavigationModuleInfo">
-
<property name="url"
-
value="edumatic/backoffice/view/modules/support/ManagementNavigationModule"/>
-
</replaceregexp>
-
<replaceregexp file="${selor-salto-test-deploy-folder.dir}/backend/application-context-backoffice.xml"
-
byline="false" flags="s">
-
<regexp pattern="ManagementContentModule.swf.{1,150}</value>"/>
-
<substitution expression="ManagementContentModule.swf" />
-
<property name="pluginID" value="MANAGEMENT" />
-
</object>
-
</value-->"/>
-
</replaceregexp>
-
<replaceregexp file="${selor-salto-test-deploy-folder.dir}/backend/application-context-backoffice.xml"
-
byline="false" flags="s">
-
<regexp pattern="<value>.{1,250}MetaDataNavigationModule"/>
-
<substitution expression="<!--value>
-
<object class="edumatic.backoffice.view.modules.NavigationModuleInfo">
-
<property name="url"
-
value="edumatic/backoffice/view/modules/support/ManagementNavigationModule"/>
-
</replaceregexp>
-
<replaceregexp file="${selor-salto-test-deploy-folder.dir}/backend/application-context-backoffice.xml"
-
byline="false" flags="s">
-
<regexp pattern="MetaDataContentModule.swf.{1,150}</value>"/>
-
<substitution expression="MetaDataContentModule.swf" />
-
<property name="pluginID" value="METADATA" />
-
</object>
-
</value-->"/>
-
</replaceregexp>
The thing me and a colleague searched on for a while was the s flag that was needed to make it work. I will try the other flags because I'm really not sure what this s flag means... (trial and error yeah!). I've seen that after the task ran the layout was messed up (no newlines anymore in the replaced text).
The .{1,150} means that a maximum of 150 characters may occur between for example MetaDataContentModule.swf and </value>.
Ciao!
<
Posted by admin on October 4th, 2008
Yesterday I had some problems installing SvnAnt.
When I used the SvnAnt 1.0.0 (bound against subversion 1.3.1) Release I got this error running a svn ant task:
Part of Ant-script:
XML:
-
<path id="all-java-libs">
-
<fileset dir="${lib.dir}">
-
<include name="**/*.jar"/>
-
</fileset>
-
</path>
-
-
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="all-java-libs"/>
-
-
<svn>
-
<status path="${basedir}" revisionProperty="revision"/>
-
</svn>
Error:
144: Problem: failed to create task or type svn
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any declarations have taken place.
After a while I thought trying with a development release SvnAnt 1.2.x (bound against subversion 1.5.0) Release
No error with this release... Strange... Googled for a moment but didn't really find a solution for the stable release.
<
Recent Comments