Wonderful Wednesday

Working hard… sorta of – it’s the day before Thanksgiving and many people aren’t working today – makes for a long weekend for many.

Well, I’m still working, so thought I’d post some updates from the week since my last ‘Saturday Splash’.

Couple of items this week of interest:

Saturday Night Live : ‘China Cold Open’

http://www.hulu.com/watch/110317/saturday-night-live-china-cold-open

Telerik ASP.NET MVC Controls

Telerik has some free open source mvc controls available: http://demos.telerik.com/aspnet-mvc/

  • Pure ASP.NET MVC components

    Built on top of ASP.NET MVC to leverage its values – lightweight rendering, clean HTML, separation of concerns, and testability.

  • Completely Open Source

    The Extensions are licensed under the widely adopted GPLv2. A commercial license with support is also available.

  • Exceptional Performance

    No postbacks, no ViewState, and no page lifecycle. The Web Asset Managers optimize the delivery of CSS and JavaScript, so no precious HTTP requests are wasted.

  • Based on jQuery

    Telerik Extensions draw on the power of jQuery for visual effects and DOM manipulations.

  • Search Engine Optimized

    The Extensions render clean, semantic HTML, which is essential for indexing your content in the major search engines.

  • Cross-browser support

    Telerik Extensions for ASP.NET MVC support all major browsers – Internet Explorer, Firefox, Safari, Opera and Google Chrome.

  • One of the biggest concerns for those hooked (more like stuck – lol) on webforms is ‘but what about my controls’?’.  Sad but true, however, with asp.net mvc it’s much easier to create controls.  Combine those with a powerful javascript library like jQuery and it can be magic.

    Take for instance the Telerik grid (by the way, you can get a similiar grid from MVCContrib, which I use, which this code is nearly the same… hmm… wonder if the same guy made them for Telerik – lol):

    <%= Html.Telerik().Grid<Order>(Model)
            .Name("Grid")
            .Columns(columns =>
            {
                columns.Add(o => o.OrderID).Width(100);
                columns.Add(o => o.Customer.ContactName).Width(200);
                columns.Add(o => o.ShipAddress);
                columns.Add(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120);
            })
            .ServerBinding(serverBinding => serverBinding.Action("FirstLook", "Grid", new { ajax = ViewData["ajax"] }))
            .Ajax(ajax => ajax.Enabled((bool)ViewData["ajax"]).Action("_FirstLook", "Grid"))
            .Scrollable(scrolling => scrolling.Enabled((bool)ViewData["scrolling"]))
            .Sortable(sorting => sorting.Enabled((bool)ViewData["sorting"]))
            .Pageable(paging => paging.Enabled((bool)ViewData["paging"]))
            .Filterable(filtering => filtering.Enabled((bool)ViewData["filtering"]))
    %>
    
    

    Simple to use, and very powerful… and free. Check out the link above to view the other available controls.

    Update: http://blogs.telerik.com/AtanasKorchev/Posts/08-11-06/ASP_NET_Ajax_Controls_in_ASP_NET_MVC.aspx

    From that link above:

    …I am glad to inform you that RadScriptManager provides support forASP.NET MVC view and master pages. What this means is that RadControls for ASP.NET Ajax can be used in ASP.NET MVC…

    
    

    (Learn more from Atanas Korchev’s blog here – he has some good posts surrounding asp.net mvc with Telerik)

    
    

    RIA Services: A DomainService IS A WCF Service – Add Service Reference

    Brad Abrams has a good post on showing how a RIA.NET Domain Service IS a WCF Service:

    http://blogs.msdn.com/brada/archive/2009/11/22/ria-services-a-domainservice-is-a-wcf-service-add-service-reference.aspx

    This is a recent change in RIA.NET – and I should add, several other services like ADO.NET Data Services – where they are using WCF ‘under the covers’ as their communication protocol.  I think this is a good move – it provides a very standard way to communicate across the wire regardless of which flavor you choose.

    Using JsonP with WCF and jQuery

    Ben Dewey has an excellent blog post on how to use JsonP with WCF and jQuery in the new release of .NET 4.0.  As he explains, the WCF team has added support for JsonP.  Since jQuery ships with a getJSON ajax function, it makes this a piece o’ pie  🙂

    ASPNET MVC from Basic to Tips and Tricks

    Michael Johson has a good writeup on tips and tricks with asp.net mvc.  I think he is spot on in all his recommendations.  Much of what he write about is best practices with asp.net mvc.

    As more and more asp.net developers see the light of mvc, we’ll need more posts like this to keep them writing good mvc code  🙂

    Refactor or Rewrite

    Another good infoq article – this one on ‘refactor or rewrite’.   I’ve had this same conversation several times in my career – as I’ve seen projects really expand and bolt more and more functionality, which ends up changing the overall scope of the application – making it harder to maintain and understand.  Obviously many companies are scared to rewrite an app from scratch.

    Other

    Google: Last but not least, I’ve really enjoyed my switch to using google products.  I switched my email address over to gmail, I’m using google reader, google docs, etc…  and finally I’m using Google Chrome in full force now.  I miss two items from Firefox that I’m looking for replacements… (1) Firebug –which is the greatest and best web dev tool ever… and (2) FireFTP.  For now, I just pop open Firefox when I need it.  I think Chrome is more stable, uses less memory, and is faster.

    I deployed a test of the Google chrome on a web project.  This enable me to keep chrome as the website engine, and allow the client to use IE still as the main browser.  Certain pages, like reporting services, just use vanilla IE to print reports, etc..

    Lastly, I had a good talk with a member of the Microsoft Patterns and Practices team last week.  I had been critical in a blog post about their releases, etc…  As always, talking directly to someone helps tremendously.  We were able to voice our concerns (I invited a few coworkers) and where we think they could do better.  It was well taken.  That team is very customer focused, and they want and value community feedback.  This helped change some of my views.   One area I want to get more involved with is growing their web client guidance – expanding it to asp.net mvc – and their Prism for Silverlight.  Just wanted to express that the P&P team is hard at work and I was able to get more clarification on the role they play at Microsoft.  As fyi – they are an extension I believe of the product teams, and yet rather than just one product, they have several under their belt – that keeps them quite busy  🙂

    That is all for this week – I hope everyone has a Happy Thanksgiving.  This is my favorite holiday – family and good food, time to be thankful for all we have.  The Lord has been good to my family and myself.  Just pray for all those that don’t have a family to be with and for those less fortunate.  I also pray for those out of work to be able to find some work.  This economy has been very hard on our community.  God Bless!

    Saturday Splash

    To continue from the Super Tuesday post – here are some more highlights from this week:

    First off, let’s get things started right… today is the best football game of the year – Ohio State vs. Michigan

    buckeye-pride

    OH!  IO!   Go Bucks  🙂

    Value Objects Presentation

    Dan Bergh Johnsson gives an enlightening presentation on ‘value objects’.  Sounds… boring… ?  Not at all.  This is a real eye opener.  I had to sigh a few times as he spoke thinking ‘I need to go start refactoring some code!’.

    Give your programming career a favor and watch his presentation over at InfoQ.

    Dan Bergh Johnsson refreshes the listeners’ memory on using value objects showing by example how their good use can revolutionize a program’s architecture, simplifying it, making it more readable and testable, in a word, better.

    Chrome OS:

    Been following the news on Chrome OS ??? Well, it’s all very interesting!  Here are some favorite links:

    Help Build Chrome OS: http://blog.chromium.org/2009/11/hello-open-source-developers-would-you.html

    Demo: http://www.youtube.com/watch?v=ANMrzw7JFzA&feature=channel

    Google OS Concept Video :http://www.youtube.com/watch?v=hJ57xzo287U

    http://googleblog.blogspot.com/2009/11/releasing-chromium-os-open-source.html

    My take on this new Operating System:

    1. “Just” Chrome… hmmm… not sure about this value.

    2. Android + Chrome ?  Now we’re talking.  This is the way they should proceed IMO.  Android would add value.

     

    UPDATE: Looks like my #2 is right on target….read about ..converge…  :) 

    Google’s co-founder, Sergey Brin…said "Android and Chrome are likely to converge over time."

     
    ASP.NET MVC 2 Beta Released:

    http://haacked.com/archive/2009/11/17/asp.net-mvc-2-beta-released.aspx

    My favorite .NET web framework has been updated to version 2 beta. From Phil Haack’s link above:

    Here are some highlights of what’s new in ASP.NET MVC 2.

    • RenderAction (and Action)
    • AsyncController
    • Expression Based Helpers (TextBoxFor, TextAreaFor, etc.)
    • Client Validation Improvements (validation summary)
    • Add Area Dialog
    • Empty Project Template
    • And More!
    Go Live

    ASP.NET MVC 2 Beta also includes an explicit go-live clause within the EULA.

    To go along with this release is a good write up custom validation in asp.net mvc 2.  A snippet of what this post covers:

    cover building a custom validation attribute using the base classes available in System.ComponentModel.DataAnnotations. ASP.NET MVC 2 has built-in support for data annotation validation attributes for doing validation on a server. For details on how data annotations work with ASP.NET MVC 2, check out Brad’s blog post.

    Great stuff Phil! This is a 3rd part of Phil Haack’s series on asp.net mvc beta 2.  This team continues to impress me on their progress.  As David Hayden has said ‘"hopefully you have spent the past year learning and mastering the ASP.NET MVC Framework, because Webforms is officially dead"’  :)  (LOL)

    P&P Web Client Developer Guidance

    I’m going to start following the Web Client guidance project from the Patterns and Practices team.  Some of their ‘anticipated benefits’ (from CodePlex site) include:

        • Provides infrastructure for developing and maintaining ASP.NET and AJAX applications
        • Provides guidance on MVC 2, jQuery, and AJAX library
        • Unit testing for ASP.NET and JavaScript client applications
        • Responsive applications
        • Flexible architecture that allows change
        • Separated presentation including unit testing view logic
        • Application modules are developed, tested and deployed separately
        • User Interface components are dynamically composed
        • Guidance on how to improve Web client security
        • Allows incremental adoption of the components

    This is a bold list, but a good list of future features.  I’m going to urge this team to make these a reality.  As some know from my past post, I consider ‘Grails’ to be the defacto standard right now for a web application framework.  That said, personally I’d like to see this team start to take on their model of convention over configuration, etc… and provide guidance that implements practices – such as IoC for injecting services into the controllers, a loosely coupled architecture, testing structures created – build/test routines, ease of switching back and forth from test/dev/production in builds – simplified setups for developers with consistent project layouts.  I think their list again, is bold, but good.  I look forward to seeing this progress.

     

    Chrome Frame:

    http://code.google.com/chrome/chromeframe/

    Yes… I actually used this – and it worked out well.  We enjoy the benefits of Chrome, and a customer that uses IE.  Where it helped was we are using Reporting Services in certain pages.  These pages did not include the frame to get the printing functionality of IE.  Meanwhile, the rest of the application enjoyed the Chrome features, all looking as if it’s in IE.  (Note: this was an intranet web app)

     

    Davey Brion’s Introducing the ‘Agatha’ Project

    http://davybrion.com/blog/2009/11/introducing-the-agatha-project/

    What is Agatha ?  Agatha is a new ‘Response/Request Service Layer’  RRSL.   http://davybrion.com/blog/2009/11/requestresponse-service-layer-series/

    These are the posts that this series consists of:

    1. Requests And Responses
    2. Processing Requests
    3. Handling Requests
    4. Exposing The Service Layer Through WCF
    5. Synchronous Client-Side Usage
    6. Testing Synchronous Client-Side Usage
    7. Asynchronous Client-Side Usage
    8. Testing Asynchronous Client-Side Usage
    9. Conclusions

    This is an open source project.  He summarized a list of items in his concluding post. 

     

    Udi Dahan (NServiceBus) on Search and Messaging:

    http://www.udidahan.com/2009/11/01/search-and-messaging/

    One question that I get asked about quite a bit with relation to messaging is about search. Isn’t search inherently request/response? Doesn’t it have to return immediately? Wouldn’t messaging in this case hurt our performance?

    Learn more about Search and Messaging – as I lean toward SOA/EDM/ESB architecture, these are critical pieces to understand, in particular the Command/Query pattern:

    See Udi’s post on ‘Command Query Separation and SOA’.

    Steve Sanderson on ‘Selective Unit Testing – Costs and Benefits’

    Steve Sanderson, author of my favorite ASP.NET MVC Framework book has a good article on ‘selective-unit costs & benefits.

    Here is a snippet to get you started:

    So why am I writing this? Two reasons:

    1. Because I think we can go further and understand the underlying forces that make unit testing worthwhile (or not) for any given unit of code.
    2. Because a minority of developers still believes that they should aim for 100% unit test coverage, and that if they don’t follow the TDD code-first process, then they’ve failed as a professional. I’m not satisfied with that view.

    CodePlex Foundation : Ajax Library Project

    What is CodePlex Foundation?

    logo[1] 

    The CodePlex Foundation is a not-for-profit foundation created as a forum in which open source communities and the software development community can come together with the shared goal of increasing participation in open source community projects

    (You can click on the image above to goto the website and learn more)

    So the news of the day is that this foundation has created it’s first ‘gallery’, the ASP.NET Open Source Gallery.

    What is a Gallery?

    Galleries may be sponsored by a third-party organization, e.g. a commercial software company, or run by the Foundation. Galleries will rely on Foundation staff and volunteers to provide a set of support services, including administration, security, best practices and marketing.

    Out of this gallery is the first project the ‘ASP.NET Ajax Library’.  This project has a wiki setup to learn more, get the source code, view some sample applications, etc…

    http://www.asp.net/ajaxlibrary/

    Head over to the ‘Learn’ section at http://www.asp.net/ajaxlibrary/learn.ashx it gives an overview of the capabilities of the library.

    Some of the examples are interesting as they provide a ‘imperative’, ‘declarative’, and ‘jquery’ approach.

    My ‘favorite’ example is the one on :

    ‘HOW TO Call ASP NET MVC Controller Actions’

    I’ll snag a few snippets off that page in a shorter format – go read for the full instructions.

    First, a controller action with model class:

    public JsonResult GetCustomers()
    {
        List<Customer> custs = new List<Customer>
        {
            new Customer
            {
                CustomerID = 1,
                FirstName = "John",
                LastName = "Doe",
                Age = 50
            },
            new Customer
            {
                CustomerID = 2,
                FirstName = "Jane",
                LastName = "Doe",
                Age = 47
            }
        };
        return Json(custs);
    }

    .csharpcode, .csharpcode pre
    {
    font-size: small;
    color: black;
    font-family: consolas, “Courier New”, courier, monospace;
    background-color: #ffffff;
    /*white-space: pre;*/
    }
    .csharpcode pre { margin: 0em; }
    .csharpcode .rem { color: #008000; }
    .csharpcode .kwrd { color: #0000ff; }
    .csharpcode .str { color: #006080; }
    .csharpcode .op { color: #0000c0; }
    .csharpcode .preproc { color: #cc6633; }
    .csharpcode .asp { background-color: #ffff00; }
    .csharpcode .html { color: #800000; }
    .csharpcode .attr { color: #ff0000; }
    .csharpcode .alt
    {
    background-color: #f4f4f4;
    width: 100%;
    margin: 0em;
    }
    .csharpcode .lnum { color: #606060; }

    ASP. NET makes it easy to return data as Json out of the box as you can see above.

    To then call this controller/action from the view:

    <script src="../../Scripts/MicrosoftAjax/start.js" type="text/javascript"></script>
    <script type="text/javascript">
        Sys.require([Sys.components.dataView, Sys.scripts.WebServices], function() {
            var dataView = Sys.create.dataView('#CustomersTemplate',
                {
                    dataProvider: "/Home/GetCustomers",
                    autoFetch: true
                });
        });
    </script>


    There is a ‘dataview’ defined above with the #CustomerTemplate referring to a html element on the page of id ‘CustomerTemplate’

    ie.

    <div id="CustomersTemplate" class="sys-template">
        {{FirstName}} {{LastName}}
    </div>

    .csharpcode, .csharpcode pre
    {
    font-size: small;
    color: black;
    font-family: consolas, “Courier New”, courier, monospace;
    background-color: #ffffff;
    /*white-space: pre;*/
    }
    .csharpcode pre { margin: 0em; }
    .csharpcode .rem { color: #008000; }
    .csharpcode .kwrd { color: #0000ff; }
    .csharpcode .str { color: #006080; }
    .csharpcode .op { color: #0000c0; }
    .csharpcode .preproc { color: #cc6633; }
    .csharpcode .asp { background-color: #ffff00; }
    .csharpcode .html { color: #800000; }
    .csharpcode .attr { color: #ff0000; }
    .csharpcode .alt
    {
    background-color: #f4f4f4;
    width: 100%;
    margin: 0em;
    }
    .csharpcode .lnum { color: #606060; }

     

    This should give you an idea, the other examples covering different topics are available, with sample code snippets and instructions on how to use the code.

    I feel they have done a good job putting this together in a easy to follow manner, and the technology presented isn’t complex.

    Super Tuesday!

    One of my coworkers recommend combining some posts together than one a bunch of ‘one offs’ of links or news of interest.

    I’ve accumulated a set of links, thoughts, experiences, etc… over the last few days (I’ve been busy). 

    New Sharp Architecture Release

    http://devlicio.us/blogs/billy_mccafferty/archive/2009/11/12/s-arp-architecture-1-0-2009-q3-with-nhibernate-2-1-1-ga-released.aspx

    Basically Sharp Architecture is about as close as you can currently get to a Spring/Hibernate MVC architecture in .NET.  My last project used several pieces of Billy’s previous ‘NHibernate Best Practices’ that I retrofit for asp.net mvc.  Then, Billy helped put together Sharp Architecture!

    A snippet of what Sharp Architecture is at the wiki:

    Pronounced "Sharp Architecture," this is a solid architectural foundation for rapidly building maintainable web applications leveraging the ASP.NET MVC framework with NHibernate. The primary advantage to be sought in using any architectural framework is to decrease the code one has to write while increasing the quality of the end product. A framework should enable developers to spend little time on infrastructure details while allowing them to focus their attentions on the domain and user experience. Accordingly, S#arp Architecture adheres to the following key principles:

    • Focused on Domain Driven Design
    • Loosely coupled
    • Preconfigured Infrastructure
    • Open Ended Presentation

     

    SpringSource updated to 2.2.1 includes new GSP Editor

    I updated my SpringSource (STS) – (see more below about STS + Grails)
    The update to 2.2.1 is here: http://www.springsource.org/node/2172

    Grooy and Grails Random Thought

    As a very well done project for building web applications…what is it’s popularity out in the world?  Are companies afraid of it?  Take NHibernate in the .NET world, in spite of it’s best of breed position, companies would rather use less to not use open source (the ‘it’s not from MS position’).  Is Groovy and Grails popular out there ?  If you do Grails/Groovy development – ping me please – let me know where your at, how you like it, etc… I’d like to see if it’s made much of a dent out there!

    What I’m reading: ‘Grails in Action’ : Some Thoughts While Reading

     
    Shout out to Manning for this e-book, love their setup, easy to purchase, prices are fair, many up and coming books on topics you don’t see in the mainstream yet!

    Chapter 1 – good start.  Steps through the creation of a sample grails app.  Covers the basic commands.  Only issue I had was using the ‘file db’ – so I setup Grails to run on MySQL, which was a good exercise.  Tests still run in memory, which is good.  Final part was using prototype with taglibs to do some simple ajax.  I like how it starts by not bogging down into details, but getting something up and running.    

    Highlights:

    • convention over configuration
    • removal of much of the xml configuration
    • testing built in.
    • Domain focus, code generated is clean and ‘pojo’.
    • Built in common functionality ie. prototype.
    • Good helper support with tablibs.

    Chapter 3

    …Chapter 2 was a nice overview of Groovy.  I’m now moving on to ‘Modeling the domain’:
    This chapter covers
    â–  What GORM is and how it works
    â–  Defining domain model classes
    â–  How domain classes are saved and updated
    â–  Techniques for validating and constraining fields
    â–  Domain class relationships (1:1, 1:m, m:n)

    STS and Grails

    http://www.grails.org/STS+Integration
    Nice setup I’m using, shows how to create or import an existing Grails project into the workspace

    I like the way that Grails provides integration tests as part of the framework that automatically handle transactional rollbacks.

    I like the integration that STS does provide for Grails.  But I do think doing the work from the command line is faster and more efficient.  After adding new items, just refresh the Eclipse project and it’s there.  This is especially good for quickly running tests.

    Grom

    One thing I see in other frameworks (ie. asp.net mvc) is the concentration on views and controllers.  Whereas in Grails, I think the pattern all starts with the domain model.  Generate the model which has what I would call ‘built in DAO support’.  GROM makes life easier  🙂

    Validation

    Grails validation is very well done, it’s built on a ‘constraints’ model with a built in validation DSL.  From Grails in Action:

    static constraints = {
            userId(size:3..20, unique:true)
            password(size:6..8)
            homepage(url:true, nullable:true)
        }

    This says ‘userid must be unique (in db) and be between 3 to 20 characters long’  – nice eh?

     

    Software Craftmanship Manifesto


    Did some pair programming last couple of days.. it was fun to say ‘whoa, this needs a new class here!’, refactor, make it more readable, etc… Must have been the next day I was shown this manifesto.  The only part that is still missing is the testing part, although some of the code is using legacy code that doesn’t lend itself well to testing… nevertheless, there is a real sense of accomplishment and success in writing code when there is craftsmanship put into it… so this manifesto is spot on!

    http://manifesto.softwarecraftsmanship.org

     

    How to start agile development in your team:

    http://weblogs.asp.net/rosherove/archive/2009/11/16/how-to-start-agile-development-in-your-team.aspx

    Thanks to Roy Osherove, as my current client was recently asking it’s team ‘are we agile’… From the link above:

      1. start doing daily stand up meeting
      2. start doing automated builds
      3. start working in pairs on relatively complicated problems
      4. start doing code reviews
      5. start showing visible progress
      6. start trying to show demos every two or three weeks
      7. start learning unit testing
      8. learn how to code better, design better
      9. start doing TDD

    As a company, there are maybe 2 items here, as a team, more like 50% ?  I will say this: more and more it’s about the culture.  Happens everywhere, even on ESPN radio there was talk about the ‘culture’ on a team in the NFL, take a so-so quarterback, joins a new team, with a different culture, and he does well…(Denver Broncos) take a star on one team, move him into another culture… and he struggles…(Chicago Bears). 

    More work needs to be done to promote a new culture in companies.  How to ‘sell’ to upper management who doesn’t seem to care ‘how’ you do it, as long as you go it… vs.  technical people in a company that totally reject anything new.   Where I’m at now, every new idea is really rejected, the company is fine with it’s ‘it was made here’ approach, but it is already showing it’s age and it’s big, bulky and hard to move it forward.  Some work was done to add some domain driven design concepts, add some tests, etc…  In the end… culture… If you haven’t watched ‘Pimp My Architecture’– watch it! 

    Here is a related article from InfoQ:

    Tips to Select a Pilot Project for Agile Adoption (InfoQ) :

    One of the most important factors which influences the success of Agile adoption is the set of learnings derived by applying Agile to a pilot project. These learnings significantly influence the organization to go ahead with Agile or fall back to their usual process. This places a lot of emphasis on the selection of the pilot project. A wrong type of pilot could end up aborting, which would be a poor advertisement for the new process.

    and

    An engaged business sponsor can help the team if it needs to push against entrenched business processes, departments, or individuals. The time and energy of a business sponsor are critical to the success of the project…all these factors become meaningful with a strong team. Hence, choosing the right team is a precursor to all the above factors.

    It takes a “strong/right” team with a mindset to embrace the agile methodology.  They later become the flag bearers for other projects within the organization.  

    NServiceBus – Web Asynchronous Publishing


    nservicebus includes an async pages sample.  Publishing a message asynchronous to a queue and it returned back to the page.  Get 2.0 beta – and learn how nservicebus works.  This brings to mind a lunch conversation today..SOA isn’t just ‘web services’ – there is much more to it.  NServiceBus helps provide a message based architecture.   

    ie. Command Query Pattern

    The command service publishes messages about changes to data, to which the query service subscribes. When the query service receives such notifications, it saves the data in its own data store which may well have a different schema (optimized for queries like a star schema). The query service may also keep all data in memory if the data is small enough.

    Learn More

    TCP Sockets, Chat Program

    Don’t ask about this one.  I am working on some port listener code for a flying sim hobby I enjoy.

    Good start …

    Building a Chat Server

    Building a Chat Client

    … by the way… Groovy does it better  🙂

    s = new Socket("localhost", 8283)
    s << "Groovy Rocks"
    s.close()
     

    (reference : http://gallemore.blogspot.com/2008/01/socket-client-for-groovy.html and Groovy Sockets: http://pleac.sourceforge.net/pleac_groovy/sockets.html)

    .csharpcode, .csharpcode pre
    {
    font-size: small;
    color: black;
    font-family: consolas, “Courier New”, courier, monospace;
    background-color: #ffffff;
    /*white-space: pre;*/
    }
    .csharpcode pre { margin: 0em; }
    .csharpcode .rem { color: #008000; }
    .csharpcode .kwrd { color: #0000ff; }
    .csharpcode .str { color: #006080; }
    .csharpcode .op { color: #0000c0; }
    .csharpcode .preproc { color: #cc6633; }
    .csharpcode .asp { background-color: #ffff00; }
    .csharpcode .html { color: #800000; }
    .csharpcode .attr { color: #ff0000; }
    .csharpcode .alt
    {
    background-color: #f4f4f4;
    width: 100%;
    margin: 0em;
    }
    .csharpcode .lnum { color: #606060; }

     

    asp.net mvc 2 beta released at PDC


    http://haacked.com/archive/2009/11/17/asp.net-mvc-2-beta-released.aspx

    Here are some highlights of what’s new in ASP.NET MVC 2.

        * RenderAction (and Action)

        * AsyncController

        * Expression Based Helpers (TextBoxFor, TextAreaFor, etc.)

        * Client Validation Improvements (validation summary)

        * Add Area Dialog

        * Empty Project Template

    I hope to see some ‘grails like’ command line scaffolding and richer domain class support in upcoming versions.   In my post there, Phil says ‘Version 3’… so.. stay tuned!

    I’m really glad to see Microsoft continuing this project, it’s a breath of fresh air – I have a 1-1/2 year project that is using it and I never grow tired of the technology part of it.   

    LifeCycle Data Services (LDS)

     

    Huh?  :)  This is one a bit out of my normal range, but I was curious about an InfoQ article talking about Flex/Flash/AIR, etc… and one of the tools they are making is LDS.   LDS is about domain modeling.

    And so the way it works is that, we have a model that becomes the centre of the universe, if you want, of the server-side developer and you create a model that represents your data. You can create it from scratch or you can introspect the database as a starting point

    …

    There is a new plugin that you add on top of Flash Builder: that is the Model Designer. The process that I just described here is actually done within Flash Builder in a kind of a visual way; so we have a visual model editor. In that model, it’s more than what you typically do in a pure data model – you can add constraint and validation rules, you can specify things that typically you would have to specify again and again in view components

    …

    Once you create your model, you deploy the model and basically you don’t have to write server side code because, based on the model, we have enough to really provide a persistence layer

    Nothing new here right..? Well, what caught my eye was that they are using Hibernate (my bff) !!!  So, even Adobe is hopping into the mix here 🙂

    Behind the scenes, this is implemented using Hibernate – the persistence layer is provided by Hibernate – and then we also do some code generation on the client side, again the value objects and the service proxies. The key point is that the foundation for that is still the data management service

    There you have it.  Now if we can just get Microsoft to embrace NHibernate and see the light…  🙂

    And last…. but not least… I saved the best for last:

    Slashdot post: ‘Less than Free’

     

    On the day that Google announced its new service, the stock in the two companies that had controlled the market for map data, Garmin and TomTom, dropped by 16% and 21%, respectively. (Those companies had bought Google’s erstwhile map-data suppliers, Tele Atlas and NavTeq, in 2007.)

    Read more about ‘the strategy behind Google’s releasing turn-by-turn mapping for free…’ .  Wow.

    Dan North Presentation… Pimp My Architecture

    Thoroughly enjoyed this presentation ‘Pimp My Architecture’ over at InfoQ…given by Dan North of ThoughtWork.

    Check it out if you get a chance  (sounds like 95% of the places I’ve been too…lol)

    At the very least, unless I’m just too much of a geek, you have to get a laugh out of his standup meeting part  🙂

    And ‘we never called it pairing… just a lot of helping going on’   🙂

    Bulk Data Operations with NHibernate

    …using ‘Stateless session’ :

    http://nhforge.org/blogs/nhibernate/archive/2008/10/30/bulk-data-operations-with-nhibernate-s-stateless-sessions.aspx

    The key here is that an IStatelessSession does not use the first-level cache.  Basically by default, every object that is saved or loaded through a session is cached in the first level cache.  In normal operations you want this functionality, but if you are, ie. looping through items to save, it’s better to use the stateless session

    Good Article on ‘Practical SOA Using WCF’

    http://blog.netshock.com/post/Practical-SOA-using-WCF.aspx

    I definitely like the event-driven-architecture discussion.  Just recently I was asked about how to link a couple of services together.  It was described as ‘orchestrating’ but in essence, it was creating yet another service to sit in front of 2 and make 2 service calls and combine the data in return…

    Which in this read, you can see he points out:

    The bigger question is how are these services linked (or coupled) together? …

    Your two choices would be EDA (event-driven architecture) or a "product" service.  The former is the preferred method as the latter creates a single service (providing a potential single point of fail) which orchestrates interaction between the various services.  The former is an architecture based on services publishing certain events which other services may subscribe to

    The patterns I see emerging here is SOA kept loosely coupled, etc… leads to a need for event-driven-architecture… which then leads to the need for an enterprise service bus.

    SOA –> EDA –> ESB

    And then ESB is about business process modelling BPM

    SOA –> EDA –> ESB –> BPM

    So, that leads me to solutions like NServiceBus.  They have actually a good article on NServiceBus and WCF.  I’ve mentioned others here like MassTransit, and I know Ayende has his RhinoBus.

    Trying to decide which route to take.  I’d prefer more convention over configuration if possible…

    Udi (create of NServiceBus) describes the architectural principles :

    Service-Oriented Architecture and Event-Driven Architecture together
    provide the basis for identifying where NServiceBus should be used.

    I’m going to plug Mass Transit as well – (Chris Patterson blogs about Mass Transit)

    I’ll end with this last quote:

    Strategic Domain-Driven Design helps bridge the Business / IT divide
    and drives the choice of business events published using NServiceBus.