Entity Framework sounds better than LINQ to SQL
Recently,I did some researches for Entity Framework and LINQ to SQL. I found Entity Framework sounds better. It got better facilities. It can generate data tables from EDX and if the tables can generate the updated classes from the database. If you are using LINQ to SQL, you need to update manually. Entity Framework sounds a more completed ORM, LINQ to SQL is only a tool to translate the objects into SQL. But I think LINQ to SQL is more lightweight.
JSON in WCF
A lot of people know about WCF supports XML as the return response. Actually, it supports JSON. All you need to set ResponseFormat.
Code
[WebGet(ResponseFormat=WebMessageFormat.Json)] | |
[OperationContract] | |
public SessionKeyDTO Authenicate(string username, string password) |
And you need to set web.config
Code
<behavior name="AdvCMS.Services.Service2AspNetAjaxBehavior"> | |
<webHttp/> | |
<enableWebScript /> | |
</behavior> |
It needs <webhttp/>. That is easy!
The code is a part of our CMS, AdvGenCMS.
Our .Net CMS - AdvGenCMS
Recently, our Company(AdvanGeneration) have built a lightweight .Net CMS,AdvGenCMS. I did some researches for .Net CMS. The most of them have own their ORM and Dependency injection framework. That is very hard to adapt into a web development framework. Thus, we decided to build our own.
AdvGenCMS is very simple. Our ORM is ms entity framework. Moreover, we have not any dependency injection framework. Currently, it used a factory design pattern, but that can choose to add dependency injection framework on your choice. Lastly, it used ASP.Net MVC. All of them are very very standard Microsoft technologies.
I don't want to add any functions you don't need. I just needed the core functions. Our CMS should be as simple as possible.
It has a user management function:
Moreover, it has a page function. You can add the static content and access them via http://[server]/Content/[PageName]
Lastly, it uses tinymce to be a html editor.
Let's use AdvGenCMS to be your web development framework. It uses Apache License.
MVC 3 Example
I have completed the users section for AdvGenCMS. I used ASP.Net MVC 3 and Razor to do. It has CRUD functions and used the LINQ Repository Pattern. I think that is a good example for MVC3 in C#.
Please download the source and check it out http://localhost:44271/Account/List page in your own development box.
Will Metro UI kill WPF?
Windows 8 will use Metro UI, even it support xaml.But that is different from WPF.Will Metro UI kill WPF? Around 2008, WPF started to get the market. At that time, I had asked whether WPF will kill Winforms. But now, I am writing some Winform applications. Winform is still alive, that is too early to say whether Metro UI will kill WPF. Moreover, Metro UI sounds a Tablet UI rather than a Desktop UI. So, I still thinks WPF will worth while.