Editable pages approach - asp.net-mvc

I'm working on application with some sort of CMS features. I need some pages to be editable. For instance:
you can edit a text block right in your browser
you can add and remove different modules to your page
For instance, if I have a main page I may want to edit welcome text.
If I have a sidebar I may want to add/remove new modules to the sidebar such as:
email subscription module
social network (facebook, twitter, etc) links block
text block
My application may have several pages, not only one.
I want to keep it simple and I'm looking for the right approach/examples/existing tools.
What's the best pattern / third-party solution for ASP .NET in order to implement this and keep it simple?

If you want to use ASP.NET MVC I think the best solution is to look into Orchard. It's really easy to get up and running, has a rich set of existing modules and building a module from scratch is really easy. This was actually started by a couple of Microsoft guys and then spun out into it's own open source project. http://www.orchardproject.net/

Related

Can we add php contact form in volusion eCommerce site?

Can we add php contact form in volusion eCommerce site?
I tried to implement but couldn't get it right.
Problem seems to me is, when calling the php file for form action to "XXX.php" file, it displays error (i.e. couldn't find the page).
Can I call "xxx.php" file from volusion "default.html" page??
Please help me out.
I know this question's a bit old but I thought I'd give you my thoughts on it anyways, You asked if you could use PHP on volusion and my answer to that is Unfortunately Not. Volusion only supports classic ASP and JavaScript on the front end of your store. (And as the previous poster said, it is written in asp.net however I've never been able to get .net code to work in it, it seems .net is only used for the admin panel and for the webservices API...)
Regardless, there are a few other ways to accomplish what you want to do; at least in my mind.
You could possibly add it with an Iframe.
If not, (if volusion blocks out your iframe, or if you just don't want an iframe) I would suggest just making your contact form in ASP or JS... You could view the following link for information on how to use their VSMPT ASP class.. http://support.volusion.com/article/vsmtp-key
If neither of the previous options work, you might also consider making the contact form be part of a new ticket. It would however require your customers to create an account first, and if it's purpose is to reach new customers you might want to look into how you add custom fields to the account registration form in volusion. This way you can have the information that you wish to collect from customers inside of your volusion admin panel.
This link may be helpful for the latter. http://support.volusion.com/article/use-custom-fields-gather-marketing-data
I wish you the best of luck working with volusion, I'm stuck on their disgusting software and sure wish I would have known the massive limitations and roadblocks, prior to starting using their product. Hopefully I'll be moving away soon! I suggest the same to anyone else on it. (sorry for the added two cents)
You can if your server will support it. What I mean by that is that Volusion is written in ASP.NET and runs on a Microsoft server. PHP on the other hand runs on a LAMP (Linux, Apache, MySQL, PHP) server.
Generally I don't find servers running both the LAMP stack and the Microsoft stack but its possible.

Orchard CMS and controller vs driver

I am a little ashamed for asking so many questions, but I really want to learn.
In Sipke's blog a webshop is created. There is one specific question that boggles my mind when trying to do something similar.
Let me spell out the basic requirements:
User registration form and login, etc. This one is covered by the blog and it works nice.
Creating product parts and so on. This one is covered and no problem there.
Ordering by filling in an order form and making the payment. See down
Having the order page maintainable by customer. See down.
Viewing your own orders and their status. See down
Maintaining customers and orders from backend system. This one is covered by the blog and I need to do some work there yet.
As for items regarding creating orders and viewing your orders. I have followed the approach for creating records and using standard MVC controllers. But then I encountered problems:
Menu for orders page. This I had to do manually after installing the module.
The order page itself. I had to create the view including title and so on. But I can imagine a customer wanting the order page on another menu and with a different title. And maybe add even some own content to the ordering page. This I couldn't achieve by using standard MVC approach. So maybe I am using the wrong approach here. So I was thinking about using contentparts for creating an order and displaying them and using the drivers and handlers for that. But before I go down that road and refactor everything I want to know if that is the right approach. A downside could be that once the module follows that route it can then not so easily be reused with customers that have other cms's capable of hosting an MVC3 module.
So when to use drivers, handlers and contentparts and when to use standard controllers and views.
You should use Drivers and Parts (with Handlers if needed) when you want to create functionality for content items. E.g. if you want to display a custom media with all products, you could create a Part (together with its Driver, etc.) to handle that. Read the docs on Parts.
If the functionality is not tied to content items the most possibly you want to use the standard MVC toolbox, it's fine. Look at the built-in modules how they do that. E.g. the Blog module uses controllers and views to show the admin UI, but has parts to enhance the functionality of for example the Blog content type.
To make things more complicated you can employ ad-hoc content items to build a page that you'd normally do with simple views, but that's an advanced topic :-).

Use html web editor (e.g. Kompozer) or web framework (e.g. Rails, Django)

I'm trying to build a basic website, but that doesn't limit my ability to add complexity later. I am a complete newb and have no prior programming experience. I'm very confused as to the role of web editors (e.g. Kompozer) vs. web frameworks (e.g. Rails, Django). For what purposes are each useful for? What makes sense for quickly building a basic, functional website that can be more professionally developed later on?
Kompozer is a WYSIWYG that allows you to drag and drop HTML elements and create your website with buttons, dropdowns and menus. You can view the code it generates and modify it if you need to.
A web framework you would typically not use a drag and drop type editor, but just type code into something that looked like an advanced Notepad. A web framework typically removes a lot of the grunt work and allows you to organize your logic separately from your design.
Basically, you would use a program like Kompozer if you wanted a simple website that didn't do much in terms of functionality. You would use a web framework for doing some heavy lifting with some custom programming... for example if you wanted to design a web application that did calculations based on the food you ate today and gave you dieting information, or where you could login and manage different types of equipment etc...

Should I move my solution to Orchard CMS or add everything manually?

At the moment I am building a big project using:
ASP.Net MVC 4
jQuery (With some extra libraries)
Castle ActiveRecord (based on NHibernate)
Implemented users and roles using .Net Membership Provider
I built almost all the website, but some very relevant parts are missing still and I noticed that this CMS supports
ASP.Net MVC and NHibernate, and have almost all the features that I need already implemented.
The features that I still need to implement are:
Internal Search Engine
Comments
Version of content
Chat betwwen users
Users Profiles Page (Something like a very basic social network)
Forum
SEO
I don't know if is harder to use the CMS or if is better to add the features one by one manually.
I am worried about the time I spend learning and adapting to Orchard is the same time I would spent adding this
features manually.
Basically, the question is:
Should I move my solution to Orchard CMS or add everything manually ?
You can't just move your solution to Orchard, you could but i won't recommend it. Orchard is still MVC 3 at the base and that way most should work if you just move your solution including the database etc. But if you ask me, spending time to add the features manually is the way u should go.
In the Orchard Galery you can find existing many modules
Internal Search Engine
Lucene (Fully functional - Writen by the Orchard Team)
Comments
Already exists in the Orchard Core Module
Version of content
Already exists in the Orchard Framework functionalty
Users Profiles Page
Profile (Fully functional? Or at least good enough as example)
SEO
Several modules
Only 2 features u will have to write yourself
Chat between users
I can't find any example code for this, but I know Piotr Szmyd has tested SignalR inside a Orchard Module which, I think, will be usefull for a Chat module. Demo is here.
Forum
Nicholas Mayne made a start of a forum module which can be used as example or starting point, maybe you can help him extent it? Currently it's sort of a pre-alpha version :(
+1 to rfcdejon's answer. I ported my current project to Orchard after at 50-60% complete. I wish I had done it sooner due to the learning curve and time to integrate all the stuff I had already written, but overall it was the right choice.
If you have significant data already set up you should account for the extra time it will take to port that into Orchard. But if you are making an app from scratch with very little existing data that would make the switch to Orchard easier. Orchard is a great choice for anyone looking for a .NET CMS that supports MVC.
Some things to keep in mind:
Features you've already built will have to be converted into Orchard content types/parts in order to take advantage of things that come out of the box with Orchard, like search, comments, versioning, etc.
Orchard has its own users/roles system, so you might have to do some work to find a module for what you're already using, or override Orchard's user/membership system yourself.
Your entire app will have to become an Orchard app, and your existing MVC stuff will have to convert into an Orchard module. Existing data access code will have to be wrapped inside a using (new TransactionScope(TransactionScopeOption.Suppress)) {...}
Forums project has started but isn't done, so you will either be banking that it will finish in time for you to use it, or that you will be able to help get it working.

Orchard for custom websites

I've just installed Orchard and created a sample site. I want to evaluate this CMS to see what it's capabilities are if I could choose it for my CMS of choice for ASP.NET MVC based sites. Has anyone used it to run a custom, highly modified website? Unfortunately no sample sites are provided at Orchard site to see it in action.
I know what my requirements will be and those are quite demanding. I have my own little CMS in ASP.NET MVC 2 which I tailor to my needs anytime I want but it lacks a lot of functionality that you get when you have a bigger team of developers at your disposal like the Orchard has.
The best way to reply to this question is if you can provide some insights into customization and if you can provide a link to a working site.
There are a couple sites out there.. Here are three I have worked on...
These two were for a University, they have a contact us page, Payment system, and also hooks in to multiple databases with a large set of business logic for students and payments. The Registration system also has an updated menu template to deal with drop downs.
http://housing.bathspa.ac.uk/ (v0.5)
http://registration.bathspa.ac.uk/ (v0.5)
My blog jsut has a modified theme which was enough to get me up an running.
http://www.themayneissue.com/ (v0.5)
There are a few open source modules I work on as well..
http://orchardopenauth.codeplex.com/
http://orchardblogml.codeplex.com/
These also allow for customization of the Orchard system
There are two community sites using Orchard, Orchard Gallery and NuGet gallery.
For now me with my team is being writing an appication for nearly two months using Orchard and the only thing I can say is that it is awesome!
Yes, Orchard is very simple for now, but it is so powerfull in the same time. I just love their dynamic shapes and content types. Use it and you'll love it!
And as a bonus:
Just get code from repo and look through it, it shines like a diamond (the only problem is lack of comments). I am sure every MVC developer will find a lot of stuff to learn from it.
There is another web site developed using orchard.

Resources