<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-266103630959214256</id><updated>2011-07-07T20:36:00.102-07:00</updated><title type='text'>Cosua</title><subtitle type='html'>Smalltalk &amp;amp; Java Software Development</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cosua.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266103630959214256/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cosua.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>acorona</name><uri>http://www.blogger.com/profile/06967449334200456663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-266103630959214256.post-6327613884857641999</id><published>2010-07-17T09:08:00.000-07:00</published><updated>2010-07-17T09:35:06.557-07:00</updated><title type='text'>Why is the use of JSTL a good practice?</title><content type='html'>I've been doing software development for a long time. I've worked with new technologies, new practices and approaches at solving problems using the technologies at hand. One of the things I've learned is to follow good practices and work towards simplicity. And simplicity is what I don't see when using things like JSTL or other custom tag libraries from various product vendors. &lt;br /&gt;&lt;br /&gt;I've been working with Java for a long time now, and when JSP's first came into picture it was a nice thing to be able to include Java code to control the rendering of the HTML output. It was a simple template mechanism without much complexity other than mix HTML and Java. Later some people thought adding tag libraries was a better approach, the reasoning behind it, I believe, was mainly that embedding Java into HTML pages is not elegant and makes the source of HTML pages hard to read by the HTML designers and the programs used to design them.  This, to me, is not a good reason to make custom tag libraries or JSTL needed. In most cases, once the HTML page is designed is then given to a Java developer to convert it into a JSP. The converted source will never go to the original HTML designer. The JSP version of the original HTML page is no longer useful to the designer, unless He is viewing it from the actual application server. So let's face it , the JSP will almost never go to the hands of the HTML designer for changes, it will always be the Java developer the one making the changes. &lt;br /&gt;Another reason, for not needing to add to the confusion and complexity of the JSPs by using JSTL, is that you can not do everything using just tag libraries. You will most likely need to embed some Java scriptlets, making the source more complex to understand (HTML + JSTL + Custom Tags + Java scriptlets), so why not just use Java scriptlets as the way to control the output generation. This way we do not have to be learning new tag libraries, we do not need to figure out what we can and can not do with these libraries. Combining HTML and Java scriptlets only makes our job much easier.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266103630959214256-6327613884857641999?l=cosua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosua.blogspot.com/feeds/6327613884857641999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266103630959214256&amp;postID=6327613884857641999' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266103630959214256/posts/default/6327613884857641999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266103630959214256/posts/default/6327613884857641999'/><link rel='alternate' type='text/html' href='http://cosua.blogspot.com/2010/07/why-is-use-of-jstl-good-practice.html' title='Why is the use of JSTL a good practice?'/><author><name>acorona</name><uri>http://www.blogger.com/profile/06967449334200456663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266103630959214256.post-8034847718121584539</id><published>2009-02-13T10:52:00.000-08:00</published><updated>2009-02-13T12:26:06.188-08:00</updated><title type='text'>Benefits of using a good RIA Framework and IDE</title><content type='html'>While doing demos of Swan, people quickly ask - what are the benefits and savings of using a Framework and IDE for building Ajax based RIAs in Java?&lt;br /&gt;To be able to answer that question with confidence, I decided to work on some examples to somehow measure the benefits with regards to development productivity. In my examples I used different metrics such as Number of Steps required to implement, Lines of Code, Cyclomatic Complexity, etc. In this article I present one of the examples I worked on including number of steps required as metrics. Note that this is not a very scientific approach for measuring the benefits, but is a good start and is simple enough to describe in this blog.&lt;br /&gt;&lt;br /&gt;The example consists on implementing a common Ajax scenerio for processng input validation. The scenario is implemented using two solutions or approaches: plain JavaScript and the &lt;a href="http://swan.objectwave.com"&gt;Swan Application Framework&lt;/a&gt;. I then compare the amount of steps required to implement each and get the metrics to compare each approach.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Processing Input Validation Scenario&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Validate the data entered by the user and provide feedback as soon as possible without waiting for a full page submit. The validation should be executed on the server side.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution 1: Plain JavaScript&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This solution uses plain JavaScript and pretty much shows what a developer would have to do in order to implement this scenario without the aid of any framework or RIA Generation Tool such as Swan. Figure 1, illustrates the steps required by a developer to implement this scenario.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_anJyaKYgtCU/SZXG2qia0SI/AAAAAAAAAaQ/KKKymxoSdG0/s1600-h/input-validate-1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 174px;" src="http://4.bp.blogspot.com/_anJyaKYgtCU/SZXG2qia0SI/AAAAAAAAAaQ/KKKymxoSdG0/s320/input-validate-1.png" alt="" id="BLOGGER_PHOTO_ID_5302362778732515618" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;Figure 1 - Input Validation Process&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This implementation requires at least 8 steps, besides designing the page, to handle the input validation:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create function to be called when onkeyup event is triggered&lt;/li&gt;&lt;li&gt;Create XMLHttpRequest&lt;/li&gt;&lt;li&gt;Make Server side request to process event&lt;/li&gt;&lt;li&gt;Process validation on the server&lt;/li&gt;&lt;li&gt;Create XML data to send back as response&lt;/li&gt;&lt;li&gt;Create callback function&lt;/li&gt;&lt;li&gt;Parse response XML&lt;/li&gt;&lt;li&gt;Update DOM&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;Solution 2: &lt;a href="http://swan.objectwave.com"&gt;Using Swan's IDE and Framework&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This solution uses Swan Framework and I used the IDE tools to implement it. Figure 2, illustrates the steps required for implementing the same functionality but now using Swan.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_anJyaKYgtCU/SZXPh1LnLlI/AAAAAAAAAag/PJFiE1iRSn8/s1600-h/input-validate-2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 174px;" src="http://2.bp.blogspot.com/_anJyaKYgtCU/SZXPh1LnLlI/AAAAAAAAAag/PJFiE1iRSn8/s320/input-validate-2.png" alt="" id="BLOGGER_PHOTO_ID_5302372316417044050" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;Figure 2 - Input Validation With Swan&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This implementation requires at least 3 steps, besides designing the page, to handle the input validation:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Bind onkeyup event to call server side method&lt;/li&gt;&lt;li&gt;Process input validation&lt;/li&gt;&lt;li&gt;Update validation message&lt;/li&gt;&lt;/ol&gt;Note, that while using Swan's tools after creating the HTML page I just had to configure the event to call the required method on the server, then just implement the method on the server to handle the required business logic and update the validation message. All this within the server side context.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Metrics&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As mentioned at the begining, I'm using the number of steps required to implement the Ajax Scenario as metrics. So here are the results:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Plain JavaScript Approach: 8 Steps&lt;/li&gt;&lt;li&gt;Using Swan Tools and Framework: 3 Steps&lt;/li&gt;&lt;li&gt;Savings: 62%&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Summary&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using a good &lt;a href="http://swan.objectwave.com"&gt;RIA Framework and application builder like Swan&lt;/a&gt; speeds up the development process by reducing the amount of work required to build an Ajax based RIA, saving IT time and money which is very important specially with the Financial times we are leaving today.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266103630959214256-8034847718121584539?l=cosua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosua.blogspot.com/feeds/8034847718121584539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266103630959214256&amp;postID=8034847718121584539' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266103630959214256/posts/default/8034847718121584539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266103630959214256/posts/default/8034847718121584539'/><link rel='alternate' type='text/html' href='http://cosua.blogspot.com/2009/02/benefits-of-using-ria-framework-and-ide.html' title='Benefits of using a good RIA Framework and IDE'/><author><name>acorona</name><uri>http://www.blogger.com/profile/06967449334200456663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_anJyaKYgtCU/SZXG2qia0SI/AAAAAAAAAaQ/KKKymxoSdG0/s72-c/input-validate-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266103630959214256.post-1642320872744471016</id><published>2009-02-13T09:01:00.000-08:00</published><updated>2009-02-13T09:20:47.928-08:00</updated><title type='text'>Portable UI and re-usable controller in Java</title><content type='html'>I'm a lead developer of Swan, an end-to-end application framework for building RIA using Ajax. The current implementation supports the Java platform and has plugins for Eclipse.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_anJyaKYgtCU/SZWqskMz6JI/AAAAAAAAAaI/xQtbiTGlAS4/s1600-h/swan-tools.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 190px;" src="http://1.bp.blogspot.com/_anJyaKYgtCU/SZWqskMz6JI/AAAAAAAAAaI/xQtbiTGlAS4/s320/swan-tools.png" alt="" id="BLOGGER_PHOTO_ID_5302331818907003026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;One of the goals for building Swan has been the ability to build portable UIs that can be re-used in different presentation platforms. This will enable developers , responsible for supporting tools on different presentation platforms, to easily port a UI without having to re-do much of the work. Instead of maintaining a different version of the tool/product for each presentation platform we thought there should be an easier way to do this, so we created the core framework behind Swan to enable the truly separation of the View from the Model and the Controller. This was nothing new for us, the work we did was initially based on the work we had done many years back in the Smalltalk platform. Swan's framework allows us to define view builders/engines for each platform reusing the controller and the UI specs defined in XML.&lt;br /&gt;The controller can then remain separate from the actual UI composition, and developers do not have to worry about creating the platform specific components. In essence we created our own UI abstraction that enables the developers to compose a UI using our widget hierarchy instead of the host widgets, hence enabling portability.&lt;br /&gt;At runtime, the selected UI engine is responsible for building the actual host components and delegates the handling of events to the re-usable controller. The image below shows the same UI rendered as a SWIN based application and as a Web based app.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;img style="width: 399px; height: 262px;" src="http://swan.objectwave.com/images/stories/swan-port-ui.png" alt="Swan based portable UI" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;In the image above you can see how the controller is reused for both presentations. Notice the highlighted code, which is called on the list click event, uses an abstracted API that is independent of the target platform: web vs. swing.&lt;br /&gt;We still have work to do but we are confident that we'll be able to provide the framework capable of supporting portable UIs.&lt;br /&gt;&lt;br /&gt;To learn more about Swan visit &lt;a href="http://swan.objectwave.com/"&gt;Swan Home Site&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266103630959214256-1642320872744471016?l=cosua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosua.blogspot.com/feeds/1642320872744471016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266103630959214256&amp;postID=1642320872744471016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266103630959214256/posts/default/1642320872744471016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266103630959214256/posts/default/1642320872744471016'/><link rel='alternate' type='text/html' href='http://cosua.blogspot.com/2009/02/portable-ui-and-re-usable-controller-in.html' title='Portable UI and re-usable controller in Java'/><author><name>acorona</name><uri>http://www.blogger.com/profile/06967449334200456663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_anJyaKYgtCU/SZWqskMz6JI/AAAAAAAAAaI/xQtbiTGlAS4/s72-c/swan-tools.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266103630959214256.post-5186262470248038026</id><published>2008-12-10T23:25:00.000-08:00</published><updated>2008-12-11T05:38:47.044-08:00</updated><title type='text'>I had forgotten how much I like Smalltalk</title><content type='html'>I've been working in Java for many year now and had not done any real work with Smalltalk until recently. We have a tool that we are now porting to Smalltalk and I just remembered why I did not like Java initially, everything seems much simpler in Smalltalk. Processing collections is much simpler in Smalltalk :&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To iterate through a collection of Employee objects to collect the name from each employee only requires the following code: aCollection collect: [:eachEmployee | each name ]&lt;/li&gt;&lt;li&gt;To iterate through a collection of Employee objects and select all employees where last name is "Smith":  aCollection select: [:eachEmployee | eachEmployee lastName = 'Smith']&lt;/li&gt;&lt;/ul&gt;There have been many new features added to Java that make it a little more like Smalltalk but it will never be the same.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266103630959214256-5186262470248038026?l=cosua.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cosua.blogspot.com/feeds/5186262470248038026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266103630959214256&amp;postID=5186262470248038026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266103630959214256/posts/default/5186262470248038026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266103630959214256/posts/default/5186262470248038026'/><link rel='alternate' type='text/html' href='http://cosua.blogspot.com/2008/12/i-had-forgotten-how-much-i-liked.html' title='I had forgotten how much I like Smalltalk'/><author><name>acorona</name><uri>http://www.blogger.com/profile/06967449334200456663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
