Friday, July 22, 2011

DOS on Dope - ASP.NET MVC the old school way

Would you like to combine old school DOS skills with modern day web frameworks? Then DOS on dope might be something for you. Everything is written in DOS .bat scripts. Yes, everything. Views and controllers are all familiar .bat scripts.

I've set up a small home page with a single Index view under a Home controller as you would expect from a simple MVC application. Here's the source:
@echo off
call ..\..\Views\Shared\_header Web Page
call ..\..\h\h1 Welcome to my web page

echo [strong] This web page is under construction [/strong]

echo.
echo [blockquote]
echo [ul]
pushd %cd%
cd ..
FOR /F "delims=~" %%A IN (' DIR /B/a:d') DO (
echo [li][a href='%%A/']%%A[/a][/li]
)
echo [/ul]
echo [/blockquote]

echo [table]
echo [tr]
echo [td]
echo [img src = "Content/anders.jpeg" width = "150"][/img]
echo [/td]
echo [td width = "400" valign = "top"]
echo Hi, I am Anders, and this is my web page. Feel free to browse around and explore my life and works.
echo [br]
echo [br]
echo Be shure you head over to
echo [a href = "http://dod.codeplex.com/"]http://dod.codeplex.com/[/a]
echo where you can learn how to make your own web page
echo [/td]
echo [/tr]
echo [/table]
echo [blink][a href = "Content/index.bat.txt"]Forget Razor, check out this awesome MVC syntax[/a][blink]

::echo [blockquote][pre]"C:\Temp\Blog\Controllers\Home\Index.bat"[/pre][/blockquote]


Nice, or what?


Links:
http://external2.webtop.no/dodblog/
http://dod.codeplex.com/

No comments: