Discover RailsKits and Stop Writing Redundant Code
Ruby on Rails has become a popular Ruby framework for creating web applications in recent years. An aspect of creating a web application is the need to repeatedly create the same base functionality.
Tracking change and innovation in the enterprise software development community
Posted by Robert Bazinet on Aug 23, 2007 03:21 PM
CodeSmith recently released a set of templates to be used with CodeSmith and Visual Studio 2008, called PLINQO or Professional LINQ to Objects. These templates are used to supplement Microsoft's upcoming LINQ to SQL and have many great features including:InfoQ recently had the opportunity to talk with Eric J. Smith, founder of CodeSmith Tools, LLC about PLINQO. Eric explained the motivation behind it:
Many developers, including ourselves, don't like black boxes. So our motivation in creating these templates was to remove that black box and to allow ourselves and other developers to be able to customize the output of the LINQ to SQL designers. We also wanted to extend the functionality of the generated classes to include business rules, authorization rules and other features.In the blog post announcing PLINQO as Professional LINQ to Objects, it states they are meant to replacement and extend the LINQ to SQL designers included in Visual Studio 2008. Since Microsoft has it's technology called LINQ to objects and LINQ to SQL, InfoQ asked if their templates are really a LINQ to SQL replacement or a LINQ to Objects replacement and why the the overlap in naming? Eric responded:
PLINQO is a replacement for LINQ to SQL and is not related to LINQ to Objects. We knew this was going to cause confusion, but we really wanted a fun name and we really liked the name PLINQO. PLINQO is a play on the Price is Right game, Plinko, which just happens to be the most fun game on Price is Right. :-)
On why a developer want to adopt your templates instead of simply keeping the ones provided by Microsoft:
The templates will work wit CodeSmith 4.0+ (see InfoQ coverage), and also within VS2008 with CodeSmith 4.1. In future releases, CodeSmith intends to add unit tests, UI generation and web services support. Paul Welter was the lead developer on the templates. Eric mentioned that the templates are in progress and any feedback would be appreciated. we would appreciate any feedback and ideas users have. Check out the CodePlex Project, and Quick Start.There are several advantages to using the PLINQO templates over the designers. Here is a list of the main reasons:
- The designer black box and allow for customization of the ouput while still retaining the ability to use the .dbml designer to make customizations inside of Visual Studio.
- To easily generate your entire .dbml file for a database and then the ability to regenerate that .dbml file as the schema changes while preserving any customizations you may have made such as entity, property and relationship names. With the designer, if you make a database change, you need to drop the entity and re-add it to get any new columns or data type changes, which would cause you to lose any customizations you may have made. Also, using the templates allows you to exclude unwanted tables, stored procedures and views using filter expressions and automatically strip / clean entity and property names of things like prefixes and suffixes that your database schema may be using (ie. tbl_Customer to Customer).
- A business rules engine that allows you to enforce things like property length rules, required field rules, regex data validation rules as well as several other built in rules including authorization rules. The SubmitChanges method on the data context object will automatically run the rules against any entities in your change set. If all rules are not met, a BrokenRulesException will be thrown that contains a list of the broken rules.
- A manager class is generated for each entity that encapsulates all actions taken on an entity. Known common actions like retrieving entities by primary key, indexes, and foreign keys are generated. Any custom actions can be added and will be preserved during regeneration. While LINQ makes it easy to sprinkle your data access logic throughout your entire application, we still believe its poor design to do so and that is why we have included the manager classes.
SCM Best Practices for Continuous Integration
Agile Development: A Manager’s Roadmap for Success
Evolutionary Design through Agile Development Podcast
Testing Tools to Support Agile Software Delivery
Alternatives in the .NET Space: Open Source, Frameworks and Languages @ QCon SF Nov 19-21
Ruby on Rails has become a popular Ruby framework for creating web applications in recent years. An aspect of creating a web application is the need to repeatedly create the same base functionality.
Steven Haines talks about tackling web application performance tuning by proposing a method called wait-based tuning.
Shaw and Fowler talk about the need for a new relationship between the business department and the IT department. Studies have shown that projects mostly fail due to miscommunication between the two.
In this article, Jim Webber, Savas Parastatidis and Ian Robinson show how to drive an application's flow through the use of hypermedia in a RESTful application.
Eccentric artist turned overnight anti-celebrity, Giles Bowkett captures the heart and soul of RubyFringe as he demonstrates his revolutionary Archaeopteryx MIDI drum pattern generator.
InfoQ Chief Architect Alexandru Popescu discusses the InfoQ architecture, WebWork and DWR, Hibernate and JCR, Hibernate scalability, the new InfoQ video streaming system, and future plans for InfoQ.
The Worldwide Large Hadron Collider (LHC) Computing Grid provides data storage and analysis for the entire high energy physics community that will use the LHC.
Scott talks about software craftsmanship represented by people responsible for their work, continuously learning, taking pride in their work, sharing knowledge and respecting professional standards.
No comments
Reply