Archive for August, 2010

Exposing Java Implemented Logic – JSP or ASP.NET ?

A developer emailed me this weekend because he had just taken a position in a large software development organization and his first task was to present a discussion top management as to the relative strengths and weakness of developing new web based functionality in ASP.NET versus JSP.

During the .COM boom I did a lot of Java development. While I liked the language very much, there was much I disliked about the experience (at least as it compared with my expectations).

The middleware back in that day was cumbersome and the write once / run anywhere mantra (which I don’t think was ever entirely true) was really exacerbated by the middleware implementations. (Though JBoss happened later and I think JBoss is a super implementation.)

I never grew to like JSP. Working with JSP had little in common with the experience of working with Servlets or EJBs – where I spent my time.

The evolutionary pace of JSP seems to have really slowed and now that Sun has been acquired by Oracle who knows what will happen to Sun’s development technology. (The futures disclaimers that appear across the Sun/Java sites might indicate a cause for concern.)

ASP.NET, PHP, Python, and Ruby / RoR are all modern, evolving web development technologies.

So WHY would a company choose to do new development in JSP?

In a word – immutable Servlets.

If I had a great deal on intellectual property in Java Servlets (more than I could reasonably port out of Java in my required time frame) and I COULD NOT modify the Servlets – then I’d probably choose JSP. JSP is hard wired to talk to Java Servlets.

Of course, if I COULD modify the Servlets, my first architectural preference would be to expose the Servlet functionality through XML Web-Services, or if performance issues demanded it, via Sockets directly.

Java, .NET and PHP all have Sockets APIs.

One advantage that .NET has over PHP for this purpose is that .NET supports a binary component model so one could start building Web based UI to expose the Servlet logic and as new development progressed the Servlet architecture could be slowly migrated to .NET objects.

All in all, the question got me wondering how many folks are dealing with updating and extending existing Java infrastructure.

How are you doing it? What technologies are you choosing ?

Buttons with Mouse-Over Behaviors – Redux

I recently posted some CSS and HTML snippets for a buttons collection I was using for a Menu style UI Scott Koon from www.LazyCoder.com posted a comment with a better way (thanks Scott). This way I don’t have to set the CSS Class for each button. Just contain them in a div. Here is the CSS

CSS
  1. div input:hover
  2. {
  3. background-color: #BFCBD6;
  4. }
  5.  
  6. div input
  7. {
  8. vertical-align: middle;
  9. text-align:center;
  10. width: 150px;
  11. height: 40px;
  12. border: 1;
  13. border-color: Silver;
  14. background-color: #465C71;
  15. color: White;
  16. }

And here is the markup.

ASP.NET Markup
  1. <%@ Page Title="Home Page" Language="C#"
  2. MasterPageFile="~/Site.master"
  3. AutoEventWireup="true"
  4. CodeBehind="Default.aspx.cs"
  5. Inherits="Button_CSSSelector._Default" %>
  6. <asp:Content ID="HeaderContent" runat="server"
  7. ContentPlaceHolderID="HeadContent">
  8. </asp:Content>
  9. <asp:Content ID="BodyContent" runat="server"
  10. ContentPlaceHolderID="MainContent">
  11. <div style="text-align: center;">
  12. <h2>Administration</h2>
  13. </div>
  14. <hr /><br />
  15. <div style="text-align: center;">
  16. <asp:Button ID="btnAdminUsers" runat="server"
  17. Text="List Users"
  18. PostBackUrl="" />
  19. &nbsp;&nbsp;
  20. <asp:Button ID="btnAdminActivate" runat="server"
  21. Text="Inactive Users"
  22. PostBackUrl="" />
  23. &nbsp;&nbsp;
  24. <asp:Button ID="btnAdminEvents" runat="server"
  25. Text="Locked Out Users"
  26. PostBackUrl="" />
  27. &nbsp;&nbsp;
  28. <br /><br />
  29. <asp:Button ID="btnAdminRoles" runat="server"
  30. Text="Roles"
  31. PostBackUrl="" />
  32. &nbsp;&nbsp;
  33. <asp:Button ID="btnAdminAccess" runat="server"
  34. Text="Access Security"
  35. PostBackUrl="" />
  36. &nbsp;&nbsp;
  37. <asp:Button ID="btnAdminSettings" runat="server"
  38. Text="Application Settings"
  39. PostBackUrl="" />
  40. &nbsp;&nbsp;
  41. <asp:Button ID="btnAdminReporting" runat="server"
  42. Text="Reporting"
  43. PostBackUrl="" />
  44. &nbsp;&nbsp;
  45. <asp:Button ID="btnAdminMisc" runat="server"
  46. Text="Misc"
  47. PostBackUrl="" />
  48. &nbsp;&nbsp;
  49. </div>
  50. </asp:Content>

Learning Microsoft WebMatrix – Chapter 3 Video Live.

Enjoy !

Video: http://www.asp.net/webmatrix/videos/creating-a-consistent-look

Tutorial: http://www.asp.net/webmatrix/tutorials/3-creating-a-consistent-look

ASP.NET Membership Training – 3 new Videos

Hi folks. Here are three more videos in my collection on Security concepts and working with ASP.NET Membership

· Adding Users to Your Membership System

· Logging Users Into Your Membership System

· Implement the Registration Verification Pattern

You can find them all at the Web Forms Security page: http://www.asp.net/web-forms/security

image

Have you checked out the Tailspin Spyworks sample application ?

[ Start HERE ]