CHAMPION KAY TUTORIAL

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:




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@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]

0 comments:

Post a Comment