I am happy to announce that we released yesterday the build 462 of CodeFluent Entities. This build comes with the following new features detailed here: www.codefluententities.com/rss.aspx (don’t forget to subscribe with your favorite RSS browser). The main enhancements are given hereafter:
- Added advanced samples “Media Library 2008″ for Visual Studio 2008
- Added advanced samples “Media Library 2010″ for Visual Studio 2010
- SQL Server producer now updates files in the target project’s specified folder instead of the root folder
- SCOM sub producer now detects Silverlight 2, 3, 4 and Windows Phone 7 target projects, and updates the references accordingly
- Added contextual help support in Visual Studio. Press F1 when a concept in selected, in Design Surfaces, Property Grid and Solution Explorer
- New Documentation Producer. This documentation producer is a 2 steps producer. It can document your code (1st step) as you would do with a tool such as GhostDoc but the process is fully automatic and you do not have anything to do manually except if you want to specify specific labels for entities, methods, enumerations, etc. If you have installed SandCastle, it can automatically generate an out-of-the-box .CHM file. Isn’t that cool! More to come on how to use this producer on this blog.
- In order to install this new build, please login on CodeFluent Entitites website and go to My Account. For those who have already installed the product, you can launch SoftFluent.Licensing.exe tool located in the start menu or in the CodeFluent Entities installation folder to download it.
Here is the presentation we did at Model Driven Day (MDDay) 2010 presentating CodeFluent Entities with a great customer testimonial (SPEIG). Half of the presentation was a step by step demo for building an ASP.NET web site starting from a blank model.
I also learnt that many attendees were from the Java world so I apologize if the underlying technology was a little bit unfamiliar to you. By the way, it is important to notice that the model designed using CodeFluent Entities fully relies on standard XML and can also be used to generate any target code such as Java even if we do not provide (yet:)) any out of the Java Producer.
Even if this blog is focused on CodeFluent Entities product, I’d like to share an announcement concerning the availibilty of the new version of our SharePoint List Synchronizer For Excel. Let’s explain what this product deals with.
Microsoft proposes in SharePoint the notion of Lists. These lists can be published towards Microsoft Excel. Until version 2003, these lists had a two-way synchronization feature directly inside Microsoft Excel.
Since version 2007 of Excel, this feature has been deprecated and is no longer available directly, as Microsoft is pushing for Access-oriented scenarios. However, there are plenty of business scenarios where this is useful to keep those lists available with read/write capabilities directly inside Microsoft Excel.
The SharePoint list synchronizer for Excel proposed by SoftFluent restores this capability in Microsoft Excel 2007 and in Microsoft Excel 2010. The feature will work in Excel 2007 and 2010 as long as you save your Excel files in Excel 2003 format ie .xls.
The product can be used free of charge for personal usage, for non-profit organizations and for businesses up to 5 employees. It can be installed and tested by simply visiting the http://www.softfluent.com/wsslists.htm web page.
After installing the tool and selecting a sharepoint list, you will find the Synchronize with SharePoint menu back!
Important : since October 2010, a security update provided by Microsoft also makes the "Export" menu inside SharePoint fail if not used through Internet Explorer in "Run as administrator" mode. The new commercial version (MSI package) we just released, handled this issue and can be installed without requiring any UAC privilege.
For commercial companies, you may purchase the product on our online store or shortly in Component Source website as the product is currently being added in their products catalog. The commercial version is an MSI package. The following screenshots shows how to install the tool and to associate .iqy files to the SharePoint list synchronizer for Excel executable.
Installing the MSI package (previous screen asks you for the product key):
Package installed successfully. You can choose to launch the tool after installation:
The tool has also been installed in the Start menu for later use:
By default, iqy files are associated to the installed version of Microsoft Excel. By clicking the Associate button, iqy file will be forwarded to the SharePoint list synchronizer for Excel tool:
You can launch the tool at any time to deassociate/associate iqy files. The installation is performed on a per user basis.
By the way, as this blog is focused on CodeFluent Entities product , I’ll do the connection between this tool and CodeFluent Entities. Indeed, every application generated by CodeFluent Entities can provide this bidirectional synchronization feature using Microsoft Excel and Microsoft Access 2007 and 2010 using the Office List Producer. The producer generates a ready to use web service that “simulates” a SharePoint backoffice and allow you to synchronize your business data (designed with CodeFluent Entities) as if they were stored as SharePoint Lists! Isn’t that powerful! And you don’t even require Microsoft SharePoint to be installed on the server, all you need is the generated web service. The documentation on how to use this producer is provided here.
Enjoy the tool and restore your productivity!
I’d like to tackle today with an important matter when developing an application : the support of Binary Large Objects aka BLOBs.
A blob represents a binary data such as image, video, audio, document, etc that you need to manipulate through a client UI. Microsoft SharePoint is a good example because it handles out-of-the-box binary data that can be stored in Lists.
Many developers today and the majority of existing ORMs seems to handle BLOBs as a data type for a property. If handling with BLOBs is just declaring a property as byte then it’s ok, developers should know how to use it and yes, existing ORMs support it. But with CodeFluent Entities, the support of BLOBs is quite different. Let me explain why.
Using byte as a data type, means that the data stored in the corresponding database column will be complete read from the database to the application server memory. Imagine you have a 1GB video file, it means that this file will first be retrieved from the database and loaded into the web server memory (if we consider a user trying to display the video through his browser for instance) and sent back to the end user browser. If we are seeking for performance and scalability, this might not be the right thing to do in your development.
With CodeFluent Entities, Blob management natively relies on streaming even if the generated code also supports other BLOB management mechanism.
Note: for those who needs to understand how that works, I’ll invite you to read this document I wrote several years ago with our CTO Simon Mourier.
CodeFluent Entities provides advanced Binary Large Objects types from the designer, up to the UI layers we support. Supported binary types are: video, audio, file, picture and blob. With all these types, the product defines optional metadatas such as FileName, ContentType, Attributes, Size, LastWriteTime, LastAccessTime and CreationTime. Like any other ORMs (as a remainder, CodeFluent Entities is NOT an ORM) the product also support the simple byte that should be used for small binary data.
For all these types we support:
- Streaming: the runtime classes provided support streaming from any client type (web, smart client, WCF) to the server. Nowhere is stored the full array of bytes, to avoid hitting .NET Large Object Heap. On the data layer, the data reader uses the SequentialAccess CommandBehavior, on web layer, we use TransmitFile to save ASP.NET memory, etc.
- Chunking: we generate automatically the code for a reusable BITS server (supporting the BITS protocol 1.4 for download and upload, without dependency on IIS).
- Caching: blobs can be cached on the server (to avoid hitting database) and on the client. We support HTTP caching client and server.
- Displaying: we provide ASP.NET custom control to view, download and upload these blobs without writing code. We provide TypeConverters and WPF ValueConverters as well to ease UI databinding.
For instance, let’s say you want to store and display videos in an ASP.NET application, this is how to simply add a Presentation property of type video on a Contact entity designed in the model:
After generation, in the persistence layer the corresponding Contact table will contain extra columns:
CREATE TABLE [dbo].[Contact] ( [Contact_Id] [int] IDENTITY (1, 1) NOT NULL, (…) [Contact_Presentation] [image] NULL, [Contact_Presentation_FileName] [nvarchar] (256) NULL, [Contact_Presentation_ContentType] [nvarchar] (128) NULL, [Contact_Presentation_Attributes] [int] NULL, [Contact_Presentation_Size] [bigint] NULL, [Contact_Presentation_LastWriteTimeUtc] [datetime] NULL, [Contact_Presentation_LastAccessTimeUtc] [datetime] NULL, [Contact_Presentation_CreationTimeUtc] [datetime] NULL, (…) GO
As you can see, metadata properties are automatically added along with blob types. Stored procedures are updated to save blobs by chunk since they can be potentially large files, and the Contact class has a Presentation property of the CodeFluent.Runtime.BinaryServices.BinaryLargeObject type.
This is an example of how to use the runtime-provided ASP.NET controls to display, update, or delete blobs in your web site, without a single line of code:
<asp:GridView ID="GridView" runat="server" AutoGenerateColumns="false" DataKeyNames="Id,RowVersion" DataSourceID="DataSource"> <Columns> <asp:BoundField DataField="Id" HeaderText="Id" /> <asp:BoundField DataField="FirstName" HeaderText="FirstName" /> <asp:BoundField DataField="LastName" HeaderText="LastName" /> <cfwc:BinaryLargeObjectField HeaderText="Presentation" ContentDisposition="inline" dataField="Presentation" /> </Columns> </asp:GridView>
The above code considers that we have designed in the model a Contact entity with the following properties: Id, FirstName, LastName, Presentation.
BinaryLargeObjectField is a utility class provided in the CodeFluent Web Runtime.
As you can see, CodeFluent Entities offers a powerful mechanism to handle BLOBs based on streaming with 0 complexity and 0 lines of code.
Today I’ll work with the R&D team about the next version of our Web Producer.
This producer will dramatically ease development of web applications and especially applications relying on Forms. You will be able to develop end to end web applications by designing your application using the Visual Studio Integrated Modeler including the Forms. The CodeFluent.Runtime.Web.dll runtime will be updated with new features to support the new generation templates but to also allow you design your own ASP.NET business controls much more easily by relying on third parties component such as Telerik or Infragistics.
For instance, we’ll add support for the following scenario: imagine you have designed in your model a Customer entity (Id, FirstName, LatName, Email, etc) that has an Address property which is another entity of your model. Address would have for instance the following properties: Id, Line, Zip, City, Country. With the next version of the web producer and the modeler, you will be able to design a Form on the Customer entity that embeds the Address properties with a transactional behavior on Save, Delete and Updates methods.
After generation, you will have a ready to use ASP.NET WebForms page (based on any master page you might configure in your application) that will display the Customer form with an embedded Address form. When you’ll create a new Customer along with its Address, the Customer will be persisted in the underlying database along with its Address with transactional support.
This forthcoming Web Producer 2.0 will first support ASP.NET WebForms generation but we also consider the generation of ASP.NET MVC pages.
This producer should be released during the second quarter of 2011.
Once more, we try to ease your life for .NET applications development with a complete environment fully integrated into Microsoft Visual Studio.
We published a press release yesterday after the CodeFluent Entities session. The official document can be downloaded here. We announced the availability of a new free, non-commercial end user license agreement that allows unlimited usage of the product for personal use and non-profit organizations.
I want to thank all the people that have attended the session and emphasize the quality of questions (and answers ) during the Q&As.
I hope that all attendees have understood the benefits that CodeFluent Entities can quickly bring in real life applications.
I joined with this post the updated presentation that I delivered along with the demonstration script. I’ll also make it available for download through the VS Live website:
Feel free to use the content of the materials and replay the demo by your own to understand the benefits brought by CodeFluent Entities.
I remind the following CodeFluent Entities resources to stay in touch with the product:
- FaceBook group : CodeFluent Entities (connect on Facebook and join this group)
- LinkedIn group : CodeFluent Entities (connect on LinkedIn and join this group)