Windows Workflow Foundation 4 and ASP.NET MVC - asp.net-mvc

We are evaluating Windows Workflow Foundation 4 to use in MVC 3 based Web Applications. We would like to create flexible order workflows for different projects.
Does anybody know good information about the general architecture or hands-on-labs for this kind of application?
Some concrete questions would be:
how can you activate a specific controller/action from the workflow?
what is the best way to communicate between the workflow and the web application (events, wcf services, ...)?

This is a nice article on how to start working with WF4 in your ASP.NET MVC app.
Integrating a persisted WF4.0 workflow with mvc

Another example with video is at below link. (Note: The code attached in the link might not be executable, but it will give some concepts when you study the code and watch the video)
https://channel9.msdn.com/Shows/Workflow-TV/endpointtv-WF4-in-the-Real-World-Microsoft-Support-ASPNET-MVC-Wizard-Framework
This link is showing how we can preserve the data between requests using tempdata. Since it is a large explanation, I am not repeating the same again here.

Sadly, the videos for this seem to be down but the docs seem to try to show you a way!
Sourced from an old post/response from 2009. An alternative is found on CodeProject.com, which is also quoted on this one with a longer list of resources.

Related

Current status of Upshot.js

I am thinking of using upshot.js along with Knockout in one of my very important projects. I do not see any documentation or any activity around upshot. Before I commit to this decision, is this project still active?
If the entire asp.net stack is now open and one can see what is getting committed to repository, why this small library is still not on codeplex or github for community to see?
I hope this is still on radar of asp.net team.
According to this blog post, Upshot is officially dead:
http://www.riaservicesblog.net/Blog/post/WCF-RIA-Services-is-Dead-Long-Live-WCF-RIA-Services.aspx
The author points to BreezeJS as an alternative:
http://www.breezejs.com
Upshot is officially dead.
"Earlier this year the Beta version of Visual Studio 2012 included a template that was designed for building “single page applications” using Upshot.js and a special Web API-based DataController that provided support for insert, update, and delete operations using the unit of work pattern with transaction support. We are not currently continuing work on that template or Upshot.js. We want to first focus on improving the development experience with existing popular JavaScript libraries and in future versions we will revisit this decision and see if additional libraries are needed to round out the SPA experience."
http://aspnetwebstack.codeplex.com/wikipage?title=Roadmap
Give a shot to JayData at http://jaydata.org, it has JavaScript Language Query and JavaScript CRUD capabilities with change tracking, batches and a lot more. What it offers over BreezeJS is its provider agnostic architecture and a number of providers that you can use out of the box: OData, webSQL, IndexedDB, localStore, Facebook and YQL.
JayData plays nicely with NodeJS and let you consume OData from a JavaScript based middletier.
Also you can use JayData not only to consume but also to provide OData if you are using it on the server side with NodeJS and mongoDB.
The ASP.NET team haven't finished the official release of ASP.NET SPA in time to ship with the final ASP.NET MVC 4 release but they are still working on it.
You can find the source code for ASP.NET SPA and follow the development effort on the ASP.NET CodePlex site:
ASP.NET SPA Source Code (to look at the upshot stuff click Browse and expand src/SPA/upshot
ASP.NET SPA Discussions
The general lack of documentation is caused by the fact that there haven't be an official release yet.
Speaking for my company - we used exactly the same combination (Knockout + Upshot) and after sweating a lot of blood, we decided to get rid of Upshot and replace it with JQuery's ajax calls. Much more transparent and much more bugfree. However, much more code, too.
Back in February the authors of Upshot promised they would put documentation on in a week or so and since then I've heard nothing of them. If you want my opinion, I think this project has already been buried or indefinitely postponed.
Accodding to what is said on the discussions(see http://aspnetwebstack.codeplex.com/discussions/topics/5321/asp-net-single-page-application) on SPA, the whole SPA strategy would change, so I think the final version o SPA or whatever will replace it will be quite different from the actual bits...so I don't know if it is a good move continuing using the actual version...that at my bets knowledge is not compatible with Mvc 4 RTM.
I am the author of the Mvc Controls Toolkit there we implemented some js functions to help querying OData, and to update entitiess that are on the client side. They handle validation errors(both client side and server side), return to client principal keys created on the server, do changes tracking (to send to the server just changed entities) and allows undoing changes done on the client side. They handle also one to many relations. Moreover, updates are handled not only with WebApi controllers but also with normal controllers.
Give a look to this first tutorial: http://dotnet-programming.com/post/2012/04/03/Mvc-Controls-Toolkit-Support-to-Mvc4-WebApi.aspx
and then refer to the other tutorilas linked.

Create custom workflow map in Win Forms or MVC

We have a Management information system that is due to be upgraded/rewritten using asp.net MVC3 or WinForms using .NET 4 and SOA.
Within the site we will need to include a workflow map which is in the curent site, I could re-use the pages that are already there but I was just wondering... does anyone know of any technnologies, methodologies that are available to do this in MVC/WinForms .Net 4
Here is an example of how the current workflow looks
I have trawled google and each search I put in directs me to the Workflow Foundation technology.
I found a really neat and flexible way to link elements together which can be used as a workflow.
JS Plumb

How to design a plugin architecture for ASP.NET with MVC Web application

Introduction:
Now I know this question could be very broad and it would be too hard to answer without me asking something specific. So All I ask is just some direction, or a brief high level explanation of a design, or maybe there is already some framework out there that could help me get started...I'm not sure.. I have never designed a plugin architecture before, so maybe there is some resource/example you could point me to on the web that would help me learn so that I may come up with my own solution.
Details of my question:
My intention is I would like to create a plug-in architecture for a new pet-project that I am building in ASP.NET MVC.
I would like to design it so that it has some sort of plug-in ability for all, or at least most, of the application's components.
The reason I would like to do this, is so that I may be able to do deployments with nearly zero down time. The idea is that when I want to deploy the latest version I would drop in the new DLLs into a specific folder, and the application would load up the new plug ins and that is it.
For exapmle, lets say I add a new "contacts" feature to my web application where users can search, add and delete contacts. I would like to be able to deploy that by way of plugins.
Is something like this even possible for Web Applications? Or am I just dreaming?
It's definitely possible.
You will need to define a pretty comprehensive interface that represents everything your plugins will have to do. You should approach it by differentiating what is "core" to your application, and where the extensibility points are. For example, where will the plugins be accessed? Will they be tabs on a page, or links in a sidebar? What properties does each plugin need to have in order to fit into the plugin container?
Generally, plugins are enumerated via reflection by looking for assemblies that implement the plugin interface.
Just for encouragement, we've done this with an enterprise product that provides a generic framework for "management" interfaces for web sites. Developers just need to drop in a plugin dll that builds specific property pages, and they show up in the management interface menu, all the navigation is taken care of, and their dll's just have to worry about their own domain logic.
There is always the dll-way where you define some interfaces that plugins follow.
But for web application, especially ASP.NET MVC, you need a controller, views and so. Probably these can be included in a dll file using prepared controller factory to handle that, but it would be hard to develop these plugins.
Some inspiration for code (or db) embedded content: Haacked about that
ASP.NET MVC version 2 will support areas, where you can put some parts of the application into different folders within the app. This way you can just upload some files and the app will recognize these new files. Read more there Haacked blog
PS: I found another person here on S.O. asking the same question as me:
Plug-in architecture for ASP.NET MVC It might be useful for someone researching the same topic.

MVC Pattern: What other Pattern to use with it?

I have developed a MVC web application with ASP.NET MVC and im just wondering which Pattern you prefer to use with a MVC project?
The one that suites the problem. Now, what's the problem?
This is a fairly vague question! I have written quite a few articles over on DotNetSlackers that specifcally walk you through from a simple ASP.NET MVC application where the web page connects directly to the data source (think standard MS tutorial) all the way through to a full distributed nTier style application where the presentation connects via WCF to business layer (allowing business components to exist on seperate servers) which then connects to a data source through a pluggable data access layer (this last couple of articles I am still writing).
Get started reading these here: http://dotnetslackers.com/projects/StackOverflowInspiredKnowledgeExchange/ in the Three Tiers to MVC section.
http://dotnetslackers.com/articles/aspnet/Building-a-StackOverflow-inspired-Knowledge-Exchange--Three-Tiers-to-MVC-Hooray-A-simple-MVC-application.aspx
http://dotnetslackers.com/articles/aspnet/Building-a-StackOverflow-inspired-Knowledge-Exchange-Three-Tiers-to-MVC-Hooray-Logical-Separation.aspx
http://dotnetslackers.com/articles/aspnet/Building-a-StackOverflow-inspired-Knowledge-Exchange-Three-Tiers-to-MVC-Hooray-Physical-Separation.aspx
Reversing dependencies article will be published in the next couple of days and the remaining articles will be out next week (roughly).
None, It's not a good idea to use a pattern for the sake of using a pattern. Design patterns solve a specific problem, and if you don't have that problem, don't use the pattern.

Building a CMS in ASP.NET MVC

I'm curious to know if any basic CMS code has been written for ASP.NET MVC.
The reason I ask is, I'm making a data-driven website for a client, and I've already spent a significant amount of time building it from the ground-up in MVC, but now the client wants content management facilities.
Basically they want to be able to add/edit/remove articles and have revision control.
It would be great if I could somehow 'bolt on' the content management without having to start again from scratch, developing it under an existing CMS.
Should I build the article management and revision control myself, or should I re-use some existing package?
N2 does what you describe - "bolts on" to existing ASP.NET solutions (including MVC).
Also, kooboo is interesting http://www.kooboo.com
(I know this question is old, but it still comes high up for the relevant search terms.)
Today I discovered Meek, http://www.adventuretechgroup.com/labs-meek/, and it was very simple and unobtrusive to add to my MVC project, which I believe is what the original poster would have wanted - bolting on CMS as a feature rather than having it take over your entire site.
Piranha CMS is well suited to bolting on to an existing application. The author of it describes why and how here. To quote straight from that source:
"Our focus is content management and to have a transparent and lightweight API for developers. Piranha CMS has almost no components or helpers that render any HTML at all, it simply provides a database, a manager interface and a routing mechanism for retrieving the correct data for the current request.
In the case of you having an existing website you could actually bypass the routing completely, add one page at a time in the manager interface and then manually load the Page model in you existing page. This would allow you to keep your original application exactly the same but manage the content form the manager interface."
If you are still looking, I've published my new open source CMS here:
MVCwCMS
I'm actively working on it so I will push more updates soon.
Here is also a quick summary as to how Telerik Sitefinity does it:
http://www.sitefinity.com/mvc-cms
in brief - allows you to plug in standard system.web.mvc.controller classes as widgets, lets you use the API for anything including model binding, standard Razor for a view engine etc.
There is also Oxite which I believe is more of a blog engine.
Heve a look at AtomicCms it's a free open source content management system based on ASP.NET MVC 1.0
http://atomiccms.codeplex.com
Check for Orchard ;-)
It is based on asp.net mvc.

Resources