Wednesday, June 18, 2014

Little about MVC versions...


MVC is a new Framework to develop web application. It helps to implements the MVC pattern which helps to provides separation of code and also provide better support for test-driven development (TDD).

Asp.Net MVC is a lightweight and highly testable open source framework for building highly scalable and well designed web applications.

Here is the little about version history of ASP.NET MVC Framework.

MVC1 :

Released on Mar 13, 2009
Runs on .Net 3.5 and with Visual Studio 2008 & Visual Studio 2008 SP1
MVC Pattern architecture with WebForm Engine
Html Helpers
Ajax helpers
Routing
Unit Testing

MVC2 :

Released on Mar 10, 2010
Runs on .Net 3.5, 4.0 and with Visual Studio 2008 & 2010
Strongly typed HTML helpers means lambda expression based Html Helpers
Templated Helpers
Support for Data Annotations Attribute
Client-side validation
UI helpers with automatic scaffolding & customizable templates
Attribute-based model validation on both client and server
Overriding the HTTP Method Verb including GET, PUT, POST, and DELETE
Areas for partitioning a large applications into modules
Asynchronous controllers

MVC3 :

Released on Jan 13, 2011
Runs on .Net 4.0 and with Visual Studio 2010
The Razor view engine
Improved Support for Data Annotations
Remote Validation
Compare Attribute
Sessionless Controller
Child Action Output Caching
Dependency Resolver
Entity Framework Code First support
Partial-page output caching
ViewBag dynamic property for passing data from controller to view
Global Action Filters
Better JavaScript support with unobtrusive JavaScript, jQuery Validation, and JSON binding
Use of NuGet to deliver software and manage dependencies throughout the platform
Good Intellisense support for Razor into Visual Studio

MVC4 :

Released on Aug 15, 2012
Runs on .Net 4.0, 4.5 and with Visual Studio 2010SP1 & Visual Studio 2012
ASP.NET Web API
Enhancements to default project templates
Mobile project template using jQuery Mobile
Display Modes
Task support for Asynchronous Controllers
Bundling and minification
Support for the Windows Azure SDK

MVC5 :

Released on 17 October 2013
Runs on .Net 4.5, 4.5.1 and with Visual Studio 2013
One Asp.Net
Asp.Net Identity
ASP.NET Scaffolding
Authentication filters - run prior to authorization filters in 

the ASP.NET MVC pipeline
Bootstrap in the MVC template
ASP.NET Web API2

MVC 6 :

Coming Soon
Support Visual Studio 2014
Part of ASP.NET vNext
MVC, Web API, and Web Pages frameworks merged into one framework
Removes a lot of overlap between MVC, Web API, and Web Pages
Self-hosting just like Web API 2 and SignalR 2
Uses a common set of abstractions for routing, action selection, filters, model binding, and so on
Use the framework to create both UI (HTML) and web APIs
Eliminates the dependencies on the legacy System.Web infrastructure
Support side-by-side deployment 
(That means you can update your app without affecting other applications on the same server)
Pay as you go: turned on in the application startup routine
Azure and PowerShell Based Deployments
The Build Process Doesn’t Build
Full Framework vs Cloud Optimized Framework

References:
http://www.asp.net/mvc/tutorials/mvc-5/database-first-development/setting-up-database
http://www.dotnet-tricks.com/Tutorial/mvc/XWX7210713-A-brief-history-of-Asp.Net-MVC-framework.html
http://www.infoq.com/news/2014/05/ASP.NET-vNext

B' hapiiiiiii always....!

Friday, May 9, 2014

Embedded Yammer News Feed


As all of us know Yammer is a social network mostly used in professionalism aspects.

So it will be nicer if possible to plug the Yammer features in to a web applications, So it will be a value added service & good marketing point too.

Yammer API reference make it easier to plug with the web application.

As per the sample code in below,

1) Embedding the yammer embedded js file to the html page where the news feed should be appear.

2) By changing the attributes in js file can activate the Single Sign on.
 its is just a configuration. According to attributes appearance of the yammer new feed can be customized.

 

3) Finally in the web app you can see the Yammer API & once logging user able to see the news feed as follows inside the application.


Its quiet easy way for a plug able News feed in a web application.

References: 

B' hapiiiiiii always....!

Thursday, March 13, 2014

Import Excel to SQL DB quiet simple....

Hi,

As POC I have done a simple project to Import Excel data to SQL Table.

It 's quiet simple & easy. I have tried to Import Excel in 3 different ways to identify which one is most effective way.

I have came across these scenarios:
  • Using .Net OleDbCommand
  • Using SSIS
  • Using OpenXml
  • Using XmlTextWriter
Actually, effectiveness depends on the Data Load. For the Bulk & the complex data I am recommending you to go with SSIS.

Let's brief one by one.

Using .Net OleDbCommand



It's just save the uploaded file & read from the FTP, then map with the columns in both Excel & DB, finally copy data in to the database.

Using SSIS



For SSIS code end it looks easy, But we have to develop and SSIS package as the requirement. If we have the deployed SSIS package, we need to just trigger the function only. 

Developing SSIS is easy & fun, But somethings I am stuck with the configurations. Only the important figures I have attached.



By defining variable we can make the package, dynamic for Excel & database.

Using OpenXml



It is similar to OleDbCommand but OpenXML is better than COM Interop in .Net. Though you don't see any significant performance in OpenXML than COM, it is easy to code. Easier to maintain. Considering the large amounts of data you should read, take a look at below link for optimizing.

Using XmlTextWriter



Here data read from an XML file content and write the same content to an Excel file. Using an XmlReader for read the XML file to the Dataset . Loop through the Dataset and add the content to the Excel file, that become slower for the big amount of data.

Refer: 
https://www.youtube.com/watch?v=jhPp_Hz54BU
http://www.gemboxsoftware.com/support/articles/article-read-write-openxml-asp-net
http://blogs.msdn.com/b/brian_jones/archive/2010/05/27/parsing-and-reading-large-excel-files-with-the-open-xml-sdk.aspx
https://www.youtube.com/watch?v=79mi31caAag


I think this will be helpful for you..

B' happy always....... :)

Monday, February 24, 2014

Update EF when Model First


EF Updating....

Now most of us familiar with Code First in .net MVC. But in here what I am trying to explain is How to Update the Entity Framework when using Mode First in MVC. Although Code First is the latest trend, some applications still depends on Model first. 

Below steps are quick guide to follow up to Update EF

Double Click & Open edmx & then Click Model Browser
In the right side of the panel -> edmx -> Store -> Expand Complex / Function Imports / SP/Functions separately

Once you want to add / update tables & sps,
If they are existing components, Delete from Model all the related Complexs, Function Imports & Sps
Remember the all the names correctly & save each process


Click on SP & Update selected Sp from the model
Click on Add Function Import & Insert Correct Function Name then Select SPs correctly
Click Get Column Info : If no any Click OK


Specially in List_SPs, Click on Add Function Import then Insert Correct Function Name & Select SPs correctly
Click Get Column Info : List of columns in the table Click Complex Add Complex name correctly Click OK
Once Done go to Solution -> Common -> Entities -> Bp ->Model.tt 
Finally Right Click & Run Custom Tool


I think this will be helpful for you..

B' happy always....... :)