Implementing document management with an ASP.NET MVC front-end - asp.net

I've implemented a website for a client that holds editable articles.
I used ASP.NET MVC and made the content manageable by storing it in a 'Content' table in the database and creating a simple Admin section of the site, where the user can add/edit/remove content and choose where on the site it will appear.
Now the client has come back wanting full document management features. They want version control, permissions, PDF export and simple workflow on all content items.
I'm debating in my head how to do this.
I found one question where a lot of people recommended WSS (Windows Sharepoint Services).
The thing is, I want to build the admin interface myself and make it really easy for the client to use.
Will WSS allow me to do this?

WSS has functionality for storing and versioning of documents, and workflow.
I don't think that PDF conversion is not part of WSS, but you could use a 3rd party tool.
You could use the WSS UI for the Admin site, placing documents in spesific document libraries. But for your ASP.NET MVC site you could access WSS via web services (WCF).

Related

Integrate CMS like Umbraco in existing application

We develop very business-case specific applications, but all applications have something in common: some pages or some parts of pages need to be freely content-managed. We often rebuild the same functionality in each application: display and editing of CMS pages.
There must be a better way! Is there any .NET CMS that can be plugged in the way we can in the main application iterate on the available pages and display them using a simple API which outputs HTML, and management of those pages is done in the backoffice / administrative pages of the CMS application.
I would imagine, for example Umbraco, which offers an extensive backoffice. You would in the backoffice be able to add, remove and edit pages. The developer would in code simply use an API like:
UmbracoCms.Core.PageManager.GetPage('CONTENTBLOCK-HOME')
This would for example retrieve the HTML content for a content block on the home page.
Does anything like this exist in the .NET ecosystem, or are there alternative solutions? The basic question is here: How would you add CMS functionality (by preference, already from a well-known CMS like Orchard or Umbraco) into an existing web application without rebuilding and reinventing a wheel each time over and which solutions already exist? What solution would allow plugging in the CMS into the existing application instead of trying to get an existing application to work in a new CMS application?
If you have properly separated application, there would be no problem to integrate it with Orchard as module.
Modules in Orchard are like MVC area so it is like subapplication.
Separate business logic, domain entities and data access to separate libraries which will know nothing about Orchard. Create Orchard module just as presentation layer and as point for registering all your dependencies in Autofac IoC which is used by Orchard.
If your application is improperly designed ... ex .. all business logic is in controller, then you are in trouble.

How to use SharePoint only as a Content Management tool from a custom web application?

We have many custom built web applications (both external & internal) written in Classic ASP and ASP.NET 2.0 technologies. Internal users can upload files to these websites, which can then be viewed by External Users. In some cases, external users can upload documents as well.
Screenshot #1 gives a brief idea about the existing architecture.
Internal users upload documents to custom web applications. These documents are stored in a folder structure defined under the web application.
Meta data and user permissions like who can access the documents are stored in SQL Server database.
The same set of documents that are being uploaded to custom web applications also exist in SharePoint. However, the custom web applications are unaware of SharePoint. So, users have to download them from SharePoint and then Upload it to the custom web applications. We are currently using SharePoint 2010.
External users can also upload documents to the custom web applications. The meta data and user permissions of the document are saved into database based on the user who is uploading the document.
Screenshot #1:
Screenshot #2 shows the architecture that I am trying to achieve. I have done very little SharePoint development. Mostly, I have used the SharePoint web services to retrieve some list content but nothing more than that. Our future Custom Web Applications might be written using ASP.NET MVC. Please find the questions after the screenshot.
Screenshot #2:
Here are my questions:
I would like to have internal users continue to upload and maintain their documents in SharePoint. User security model is already defined in the SQL Server database. This security permissions should be available in the SharePoint document properties so users can choose who can view the document from the custom web applications. How can I achieve this? Should I have to copy the SQL Server user permissions info to SharePoint?
I believe that SharePoint Web Services or Business Connectivity Services (BCS) can help in retrieving the document and its related info from SharePoint. Which one of these would better suit this scenario?
Custom web app should display only the committed versions of the documents. If a user has checked out a document in SharePoint to make any changes, that checked out version of the document should not be visible to External users. Is that possible?
Has anyone tried this approach? Are there any pitfalls with this model? Are there any performance concerns with this design?
Will this design be of any hindrance if I rewrite our existing applications using ASP.NET MVC?
Is it possible to make use of SharePoint search feature within the custom web application (ASP.NET Web Forms / ASP.NET MVC)? In other words, can I send search criteria from custom web app and have SharePoint do the search and return the results back to custom web app?
I really appreciate your inputs.
Thanks in advance.
Question 1
Hard to say without having more details. So I'm going to assume that you currently use Active Directory for your authentication store. So this means that your SQL Server defines a list of roles and then has assigned memberships to these roles. I'm going to assume that your assigned membership is to AD users or groups. If this is true then I think your on the right path to push your permissions from SQL Server into SharePoint. SharePoint's API will accommodate what you need to do, however SharePoint has no built into mechanism for syncing your permission changes so that means you end up writing a whole lot of plumbing code. I would recommend that you research products that can handle the synchronization for you. Microsoft MIIS (I believe it is called Forefront Identity Management now) offer a set of architecture patterns that you should investigate.
Question 2
SharePoint Web Services or the SharePoint Client Access Services should work fine. I would highly recommend that use a proxy pattern to isolate your application from SharePoint calls (so you can isolate your application from SharePoint upgrades and potential content management server changes).
Question 3
Yes, that is possible. If you are using the publishing features of SharePoint Server (NOT SharePoint Foundation) you will have an easy way of identifying the current published version. Otherwise the service account you query with should be setup so it can only read published versions then SharePoint will automatically trim your query.
Question 4
I have not personally tried this design, but I really like the concept of creating a content management domain and then putting an abstract service layer on top of it. Will you have scale problems, depends on how you configure SharePoint and your applications. You can do it right or wrong. An depth answer between the two cannot be covered here. My one piece of advice is to make sure you plan for caching in your service interfaces (cache, cache, cache).
Question 5
Not if you implement it as a Service Layer. You would just use a repository pattern to call the service and return back entities for your model.
Question 6
Yes, Search is exposed via an API so it can be wrapped in a service layer too.
Good luck and feel free to contact me directly for more in depth discussion.

Is there a web application layer over AdventureWorks?

I'm wondering if anyone has implemented a web UI on top of the AdventureWorks database? IOW, I'm not looking for just a application data layer on top of the schema. Rather, I'm wondering whether anyone has created an ecommerce front end on top the AdventureWorks schema?
Sounds like a good chance to try ASP.NET Dynamic Data (point it at a database and generate a web application that supports basic CRUD procedures).
The SQL Server Samples Portal Page has an end-to-end product sample called Storefront which uses the AdventureWorks database as the backend:
Scenario
A developer wants to implement an e-commerce Web site. The Web site
should offer additional product recommendations based on the contents
of the shopping cart (product up sell).
Languages
Transact-SQL, XML, XSD, Visual C#, and Visual Basic.
You can easily generate one with Subsonic (free)
There are commercial products that can generate an entire application by pointing at a database, IronSpeed, for example. (Has a trial version)

Integrating Sharepoint and MVC

We currently have a product that uses Sharepoint and a number different Web Part libraries to display realtime data to customers. The way this has been set up is that each customer has a custom login (Active Directory), a custom site with their specific data hooked up in the web parts. That means for every customer we have a completely separate site. Eg:
Customer 1 -> www.site.com/sites/customer1
Customer 2 -> www.site.com/sites/customer2
Customer X -> www.site.com/sites/customerX
As you can imagine, this is impossible to maintain as any small change that we make has to be manually propagated across all of the site, a task that has become impossible.
We are also developing separate ASP.NET MVC application that live on the same server under their own Virtual Directories Eg. www.site.com/App1/
I've been tasked with investigating how to best redesign the system to provide a more integrated and "application platform" type architecture.
Personally I would love to just ditch the Sharepoint as I think we are using it incorrectly (not as a CMS at all), but my manager wants to keep the Excel Services for customers who pay extra (a customising service).
We currently embed the MVC applications in Sharepoint using the Page Viewer Web Part, but this gives us less control over the layout of these applications
My next thought was to have a standard ASP.NET masterpage across all MVC sites and sharepoint so that they look the same, whilst still providing the functionality required, but investigation and testing seemed to be that Sharepoint master pages are horrible beasts that barely resemble a clean master page.
Basically I'm stumped, and I'm getting a little disheartened about Sharepoint and it's god awfullness.
Does anyone have any experience with this or could provide some ideas/tips?
Very much appreciated.
CodePlex - SharePointMVC
A helper project for hosting asp.mvc content inside SharePoint.

Integrating SharePoint document libraries into an ASP.NET page

Is there any way that I can use SharePoint document library and document sharing functionality from an ASP.NET page?
There's 3 ways you can have your standalone ASP.NET (standalone meaning not integrated into sharepoint) interact with sharepoint.
1 using the SharePoint object model (sharepoint APi dll's). This way allows you to control every part of how your ASP.NET site interacts with SharePoint (document security etc.) The major drawback is that you ASP.NET site needs to be running on the SAME SERVER as SharePoint (or if sharepoint is used in a farm any machine that is running sharepoint in that farm). Simply including the SharePoint DLL's will NOT work when run on any other machine (even when that machine also has sharepoint installed but is not part of the farm you want to communicate with!)
2 Web Services. These OOTB services can be used from anywhere but are not very extensive functionality wise. They allow you to perform a lot of actions and retrieve a lot of data, but when it comes to more finegrained control they just don't cut it. It might be enough for what you want to do though.
3 Use web services and create your own webservice that is deployed to sharepoint for any tasks not doable with the OOTB services. This requires access to the sharepoint machine in the form of deploying custom code / assemblies though.
I assume that your asp.net application is running on another server because if thats not the case the it would probably be easiest to just use the SharePoint functionality directly and maybe include your app into SharePoint
SharePoint exposes a lot of it's functionality through Web Services, so you can get, add, delete and update information through these.
You can include any SharePoint page into a page in another portal using an IFrame. The main issue there is the fact that you will get the MOSS navigation in that IFrame, which typically is not desired. To overcome that, you can create a special MOSS page that hides all those elements and show just the element you want to expose. To accomplish that, you can create a “minimal” master page and a simple layout with a single web part zone.

Resources