Posts Tagged ‘.NET’

Why more architectural layers = less toil (Part 4)

Monday, November 23rd, 2009 by Don Robins

I my last post, I described the benefits of applying the Repository pattern to encapsulate all logic pertaining to the direct manipulation of your data entities. The repository is responsible for shaping the data entities that will get passed back up through the ASL to your services or views, as well as pushing the data through the data services layer down to its final persistence location. You should note that this could be any number of data source types, from a relational database, to xml files, to an external web service. The repository is the manager of all such data centric interactions.

It is most important to note that when fetching data and passing it up into the application layers, it should be packaged appropriately based on the need of the calling layer. While you could simply pass full data entities of your Model into the application from repository calls, care should be taken to avoid unnecessarily exposing full Model entity details throughout your application. It is important to minimize the number of locations that will break if the data model changes over time, and rest assured, it will change over time. For this reason, we depend upon the ASL and Repository layer interfaces when using and accessing the Data Model as these methods can be used to create packages of data that represent just the specific information necessary to enact a Use Case or support a View. This collection of information is often referred to as the ViewModel; you can think of this as a Model specifically abstracted for the View, or a specialization of the domain Model.
(more…)

Why more architectural layers = less toil (Part 3)

Monday, November 23rd, 2009 by Don Robins

In my last post, I described the benefits of the Application Services Layer (ASL) and how it can act as a representation of a particular domain in your application. Your services or UI layer talks directly to the ASL layer for all of its needs; it effectively represents an Application Programming interface (API) to your application that can be utilized by any number or style of front end web services or thin client applications.

Now let’s drop down a level. Implementing a Data Repository pattern provides a class whose methods represent specific actions that must be performed upon data entities managed by the Model. You would typically create one repository for each sub-domain or arbitrary collection of your system’s entities, and these methods will act upon the entities in your Model, calling on their methods, perhaps setting their properties, perhaps managing multiple entities or a list of entities all at once.
(more…)

Why more architectural layers = less toil (Part 2)

Monday, November 23rd, 2009 by Don Robins

In my last post, I introduced the concept of extending the separation of concerns beyond the common MVC pattern. While separating the front end of the application into the Model/View/Controller objects is certainly a good thing, we can continue to extend the layers beneath the MVC and continue to gain great leverage.

Let’s start with the Application Services Layer. An ASL class should implement an interface with methods explicitly representing a particular domain in your application. The methods comprising the interface of an ASL class would explicitly match the names of your defined Use Cases. Each collection of methods represents what might be considered, and could eventually end up being implemented as, a component in your system. A small application may have only one such class, but a complex enterprise application could have dozens of these classes.
(more…)

Why more architectural layers = less toil (Part 1)

Thursday, November 12th, 2009 by Don Robins

In our most recent Agile Enterprise JumpStart project, we built an application and collection of web services using the ASP.NET MVC Framework for one of our clients. Our decision and recommendation to use this particular technology was based on an early JumpStart Assessment that showed (contrary to the customer’s original beliefs) that the system requirements called for both a set of web services accessible from a Flash application running ActionScript, as well as an Administrative interface for the application’s relational data. The ASP.NET MVC framework, with its capability for serving up serialized JSON or XML data, as well as HTML views directly from a controller, was a perfect fit.
(more…)

What is the current version of SQL Server Compact Edition?

Thursday, July 30th, 2009 by Don Robins

tweetthisbutton At last night’s BAADD .NET Developer User Group meeting, I presented on Getting Started with SQL Compact Edition. The content for the presentation was based on knowledge that we have evolved from working with the technology over the last year plus how we leveraged it during our most recent Agile Enterprise JumpStart project. We built a foundation architecture for a rewrite of a commercial desktop application for one of our customers which required both a local disconnected database and an n-tier data services layer.

As usual, at the start of the meeting, we asked the attendees what was the one thing they hoped to get out of the presentation. While a number of people had some specific interest in performance or replication considerations, it was clear that the primary motivation for the 35 people in the room was a lack of understanding about the product.

One of the most common issues was the confusion about the versions that have appeared over the years, and a lack of clarity regarding which was the most current version, and what was its relationship to the current versions of both SQL Server and Visual Studio.

As this was exactly one the issues that I had dealt with when I first started working with the technology, I had devoted one of the slides (you can get them here) to listing the different versions that have appeared since its release in 2000 as SQL CE 1.0 so I thought I would post the information here:

○ 2000 – SQL Server CE 1.0
○ 2003 – SQL Server CE 2.0
○ 2005 – SQL Server Mobile 3.0
○ 2006 – Beta known as SQL Server Everywhere Edition
○ 2007 – SQL Server Compact Edition 3.1
2008 – SQL Server Compact Edition 3.5 SP1

So…to answer the question - the current version is 3.5 SP1 as of this writing, and is available for download at the Microsoft SQL Server Compact 3.5 homepage.

An important point I raised was to be cautious when researching SQL CE on the web. You will want to pay close attention to the version associated with the content that you find in your searches. You will no doubt find content that appears to be related to your search, but you may not realize that the context is for a version not matching the one you are working with.

As we continue to work with SQL CE, I intend to BLOG on additional content. I have also started a discussion thread on the BAADD SF .NET LinkedIn Group, so please feel free to join in there or leave comments here.