Static Website Generators in MVC3 or ASP.NET in general - asp.net

I see a lot of projects in other languages for generating static web sites from dynamic engines. Things like Frank, Jekyll, Hyde, Webby and Poole.
There is a large list here:
http://iwantmyname.com/blog/2011/02/list-static-website-generators.html
But I can't seem to find anything in the .NET space.
I find it an interesting angle of combining performance and usability on relatively static content like blogs.
But I can also see this as a great HTML based help generation system. And I don't mean API documentation, for which there seems to be a hundred projects. I mean actual application documentation or other documentation.
So, any great static website generators in the .NET space?

A relatively recent development is the 52 code project Pretzel - a .Net static code generator. It is worth a look if you know Jekyll.

I know this is an old question, but for completeness I'll add http://wyam.io (open source - code at https://github.com/Wyamio/Wyam). It uses a modified version of the Razor engine from ASP.NET v5 for templating and also has support for Markdown. It's built on a modular "pipeline" concept (similar to the excellent Metalsmith JavaScript-based site generator) and is easy to extend given that the configuration files are dynamically compiled with Roslyn.
Full disclosure - I am the developer of Wyam.

Graze is a possible option too!
https://github.com/mikoskinen/graze

Related

static website generator

I was recently asked to create a web page using a static website generator, like Jekyll. My question is this:
How does this differ from just creating a website using HTML or writing the page as an ASP.net project in Visual Studio?
How does it work on the server?
What are some concerns I should have?
I'm a .net guy, so I would like to be able to create this in visual studio, if possible.
Here are some advantages and disadvantages that came to my mind:
Advantages
can be deployed on every server, as it's just static html
has partials, that can be reused, in contrast to normal html, where you have to code/copy paste every thing
you can still code in an IDE
a non developer can edit code (sometimes at least)
Disadvantages
the template language is limited and sometimes a bit awkward/needs to get used to
you have something new in your environment, which has additional costs (more than one developer needs to know how to build the site, ...)
If you know your current toolkit well and you do not have a problem hosting another ASP.net project on your server, I do not see the need for you to introduce another tool in your tool chain.
If you want to do something, where users can generate content - like github does on the github pages - this is something you might consider.
As for Jekyll, we tried it on one project and being devs, who like to code, we ran into it's limitations quite early. You can work around this, but if you know a programming language you will be faster. It was still fascinating, how far we were able to go with just using Jekyll
With ASP.NET pages exist throughout the life cycle of the page, and able to work with request and session context. See this article asp.net page life cycle
HTML pages are static and you can not access any variable that is on the server.
I recommend you follow the step by step this link to go to just understand how to develop ASP.NET http://www.asp.net/get-started
I hope that helped
Vicente

Does VS.NET 2010 support setting up sub-projects for web applications?

I have been looking for a solution for breaking up a large enterprise web application into smaller more-manageable modules and be able to build and deploy individual sub projects while at the same time have each sub-project inherit from a common set of resources such as master page, parent Page class, app_code, css, etc.
I found a workaround for setting this up in VS 2005/2008. in a Visual Web Developer Team Blog Post .
Question is: Is there a new approach to solving to this problem in VS 2010 (apparently the same workaround mentioned above doesn't work for VS2010). Or perhaps I'm going down the wrong road altogether; although it makes sense to me that this would be the desired way to setup large enterprise applications, if not whats the industry standard or best practice?
Your help and comments are appreciated.
Thanks.
Break your solution in an organized manner identifying major blocks and separating thins the way that best fit your needs.
A good example to get started is nopCommerce that can be found at codeplex. An older version (web forms) is also available.

Thoughts on streamlining multiple .Net apps

We have a series of ASP.Net applications that have been written over the course of 8 years. Mostly in the first 3-4 years. They have been running quite well with little maintenance, but new functionality is being requested and we are running into IDE and platform issues. The apps were written in .Net 1.x and 2.x and run in separate spaces but are presented as a single suite of applications which use a common navigation toolbar (implemented as a user control). Every time we want to add something to a menu in the nav we have to modify it in all the apps which is a pain. Also, the various versions of Crystal reports and that we used tables to organize the visual elements and we end up with a mess, especially with all the multi-platform .Net versions running. We need to streamline the suite of apps and make it easier to add on new apps without a hassle. We also need to bring all these apps under one .Net platform and IDE.
In addition, there is a WordPress blog styled to match the style of the application suite "integrated" into the UI and a link to a MediaWiki Wiki application as well.
My current thinking is to use an open source content management system (CMS) like Joomla (PHP based unfortunately, but it works well) as the user interface framework for style templating and menu management. Joomla's article management would allow us to migrate the Wiki content into articles which could be published without interfering with the .Net apps. Then essentially use an IFrame within an "article" to "host" the .Net application, then...
Upgrade the .Net apps to VS2010, strip out all the common header/footer controls and migrate the styles to use the style sheets used in the CMS.
As I write this, I certainly realize this is a lot of work and there are optimization issues which this may cause as well as using IFrames seems a bit like cheating and I've read about issues with IFrames.
I know that we could use .Net application styling, but it seems like a lot more work (not sure really). Also, the use of a CMS to handle the blog and wiki also seems appealing, unless there is a .Net CMS out there that can handle all of these requirements.
Given this information, I am looking to know if I am totally going in the wrong direction? We tried to use open source and integrate it over time, but not this has become hard to maintain. Am I not aware of some technology out there that will meet our requirements? Did we do this right and should we just focus on getting the .Net streamlined? I understand that no matter what we do, it's going to be a lot of work. The communities considerable experience would be helpful. Thanks!!
PS - A complete rewrite is not an option.
Hmm, we're in the midst of a project to do something that sounds familiar. We're using www.sitecore.net CMS but you could use the Open Source alternative Umbraco again both of these will have a learning curve, but they're .Net apps and aren't targetted specifically at blogs. SiteCore ultimately can use normal .Net user controls if you want, though it's slightly against their model, but it works.
One thing I'll warn you of is SiteCore Must be the root of your website, it has to control the root of the domain (it has a urlrewriting module that needs to be at the root) and you can tell it to exclude certain folders where your applications might live. You can obviously put your navigation in a folder under the root of the site. Also note SiteCore's a .Net 3.5 application running under the 2.0 runtime.
Are your sub-applications.. Actual seperate applications in virtual dirs or something I'm guessing?
Depending on the nature of the .Net apps, you may find DotNetNuke to be a useful choice.
It's a CMS where you write widgets ('modules') in .Net, then add them to the pages of the CMS. In your case, you'd wrap your existing functionality in such widgets. I've done exactly this several times, and now that I'm used to it it's no big deal.
The downside is you have to learn to swim in the DNN environment, which (like any CMS) has a bit of a learning curve.
I'd have to know a lot more about your existing apps to be sure this is a plausible option. If it looks appealing, you should probably contact someone who's dealt with a situation like yours (such as myself) and go into detail. It's very easy to find yourself in a dead end with these CMS frameworks.
Edit: Like a product mentioned in a different answer, DNN has to control the top level of its subdomain -- all requests begin by going through Default.aspx and are then dispatched in various ways.

Is there a Django or Rails for the .Net Platform?

Now before I dive too far into this this question, I am aware of nDjango and MonoRail; however, those project seem to be lacking.
What I'm wondering is if there is a solution out in the .Net world that has the following features out of a single box like Rails has in Ruby or Django has for Python. I know tools that do pieces but am curious if there's 1 unified solution out there.
Database Versioning/Migrations
ORM or similar code gen
MVC-based
Pre-generated administrative screens
View generation
Theming / styling
(I'm sure I'm forgetting another cornerstone feature)
There's lots of options that cover one or more of these aspects but is there something in .Net that covers all of them?
Thanks
I have not yet found a solution as you have described, but as you know there are bits and pieces that could be used together to provide a stack that is close:
Database Versioning/Migrations - DotNetMigrations
ORM or similar code gen - Nhibernate, Entity Framework
MVC-based - native to ASP.NET MVC
Pre-generated administrative screens - PLINQO
view generation - available in Entity Framework or CodeSmith templates, PLINQO
Theming / styling - native to ASP.NET
This would provide a stack that is .NET and not another ecosystem sitting on top of a .NET substrate.
You can actually run Rails under the .NET DLR. This allows you to not only access the feature set Rails provides, but also everything else which is available in the .NET ecosystem.
I haven't found a one click installer which gives me everything on your list, but, as you say, I have found excellent solutions for each point on your list which integrate well.
I'm honestly not sure how close this gets you, but S#arp Architecture seems to be trying to cover a lot of this ground in a single package.
There is a django for .net, the name is django!
In the web there is a lot of post about django running with ironpython (a implementation of python for the "virtual machine" of C#, CLR, i think)
there is also ndjango - the django templating language written in f# for .net. you can use it with bistro or asp.net mvc (or whatever else that you plug it into)

Integrating my website with BlogEngine.Net

I am developing a site (ASP.Net based) that, besides other features enables the users to blog as well. I am thinking of integrating BlogEngine.Net to my portal.
From whatever little I have analyzed, integrating at presentation layer will be far more challenging in comparison to doing so at business layer. That means (I guess) I will have to use the BlogEngine.Core.dll in my application.
I am looking for some sort of approval from the community, complimented with suggested do's and dont's. BTW, I find the business layer a bit intimidating (complex) as I want some basic & necessary features only.
you can check out http://www.ajaymatharu.com/integrating-blogengine-into-an-existing-site/
I recently did this for a client - note how I styled the blog to fit the main site design:
http://www.homenetdirect.com/
This was an ASP.NET 3.5 Web Application Project with master pages. I took one of the basic themes from BlogEngine that resembled what I was trying to get lookwise. Then I had all the elements that needed to be styled. Do the CSS gradually starting from the main container and work your way in (use Firefox dev toolbar). One more thing: I had to set up a subdomain for the blog - contrary to what a lot of people say, this will not hurt your SEO. SEO starts and ends with good content.
EDIT:
Creating themes for BlogEngine (Al Nyveldt's tutorials are worth watching):
http://www.nyveldt.com/blog/post/BlogEngineNET-Creating-Themes-Webcast.aspx
I integrated BlogEngine.NET 1.4 on my website. The result is exactly ONE web application (not a web site). However, the task wasn't an easy one as I had to change the source code of both the presentation layer and the core DLL to fit my needs. Now there's already version 1.6 and I guess, I'm gonna have to do same work again some time.

Resources