Net on a shoe String By: Patrick Brannen


Download 459 b.
Sana24.05.2018
Hajmi459 b.


.NET On A Shoe String

  • By: Patrick Brannen

  • Lead Developer

  • iDevCo, Inc.

  • http://www.idevco.com

  • pbrannen@idevco.com


.NET On A Shoe String

  • Objective

  • Introduction

  • Budget Scenario

    • VS.NET Features
    • What Can You Do Without VS.NET?
  • Requirements

  • Components & Acquisition

  • Installation

  • First Project

  • Object Oriented Programming/ Model View Controller

  • Coding

  • Compiling & Deploying

  • Documenting

  • Upgrading to VS.NET

  • Conclusion

  • Resources



Objective

  • Learn what is involved with setting up a development site to begin learning .NET without using Visual Studio.Net

  • Learn which components are required and where to obtain them



Introduction

  • What is .NET

    • From http://www.microsoft.com/net/basics/: Microsoft® .NET is a set of software technologies for connecting information, people, systems, and devices. This new generation of technology is based on Web services—small building-block applications that can connect to each other as well as to other, larger applications over the Internet.
    • Developer’s Standpoint: Collection of Classes


Introduction

  • The Usual Configuration

    • Visual Studio.NET
    • Deployed to Server Running IIS 5.0+ and .NET SDK


Budget Scenario

  • VS.NET Cost*

    • As of VS.NET 2003’s release, you have to purchase a MSDN Subscription which will entitle you to a copy of the VS.NET 2003. Levels of MSDN Subscription** include:
      • MSDN Universal which includes:
        • Visual Studio.NET 2003 Architect
        • Cost $2,799
      • MSDN Enterprise which includes:
      • MSDN Professional which includes:
        • Visual Studio.NET 2003 Professional
        • Cost $1,199
    • **Source: http://msdn.microsoft.com/subscriptions/prodinfo/pricing.asp * Academic pricing available also


Budget Scenario

  • What can you do without VS.NET?

    • Client Story
    • Using the .NET SDK you can:
      • Create Web Pages
      • Compile Objects
      • Deploy Code


Requirements

  • Windows version that supports .NET SDK (for developing) (version 1.1 from http://msdn.microsoft.com/netframework/productinfo/sysreqs/default.aspx)

    • Microsoft Windows® Server 2003 family
    • Windows 2000, with the latest Windows service pack and critical updates available from the Microsoft Security Web site
    • Windows XP (Windows XP Professional is required to run ASP.NET)
  • The Redistributable (for deploying) can be deployed on other Window’s Operating Systems.

  • The .NET SDK



Components and Acquisition

  • .NET SDK (version 1.1 though 1.0a and its service pack still available from Microsoft’s website)

    • http://microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en
  • MDAC 2.7

    • http://www.microsoft.com/downloads/details.aspx?FamilyID=9ad000f2-cae7-493d-b0f3-ae36c570ade8&DisplayLang=en
  • NAnt (a .NET compile tool)

    • http://nant.sourceforge.net
  • WebMatrix (a free color coding .NET editor)

    • http://www.asp.net/webmatrix/


Components and Acquisition

  • Optionally:

  • NDoc (a .NET API Document creator)

    • http://ndoc.sourceforge.net/
    • Requires HTML Help Workshop available at:
      • http://go.microsoft.com/fwlink/?LinkId=14188
  • Log4Net (A logging API)

    • http://log4net.sourceforge.net/
  • A Database:

    • Freely available ones include mysql, postgresql, for a sqlserver compatible one get MDSE at http://www.asp.net/msde/default.aspx?tabindex=0&tabid=1
  • Source Control

    • CVS http://www.cvshome.org


Components and Acquisition

  • Snapshot of directory containing all downloaded components:



Installation

  • MDAC

    • Straight forward, a few dialogs
    • Reboot required
  • .NET

    • Straight forward, a few dialogs
    • Check “Register Environment Variables”
  • NAnt

    • Extract Zip to a place on your harddrive
    • Add the /bin dir to your System Path


Installation

  • WebMatrix

  • Log4Net

  • HTML Help Workshop

  • NDoc

    • Unzip (I did to c:\ndoc)


First Project

  • Language

    • The .NET CLR
    • Language Neutral
    • C#
  • Choose source code location

    • C:\projects\web2003
  • Choose deploy location

    • C:\inetpub\wwwroot\web2003


First Project

  • Create and edit default.build

    • http://nant.sourceforge.net/help/fundamentals/fog0000000022.html
    • http://nant.sourceforge.net/help/tasks/index.html
  • .NET Class Library

    • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp
    • Object Browser that came with Web Matrix


Object Oriented Programming/Model View Controller

  • Type II - Model View Controller

    • Three programmatic layers
      • Model
        • Database
        • Business Logic
      • View
        • Presentation
        • Web Layer
      • Controller
        • Single component which essentially directs traffic


Object Oriented Programming/model View Controller

  • Object Oriented Programming

    • Everything is an object
    • Inheritance
    • Encapsulation
    • Promotes code reuse
    • Promotes modeling business logic objects after real world objects
    • Promotes clean/easily maintainable code.


Coding

  • Code Behinds

    • Separate Business Logic (Model) from Markup (View)
    • The Exception to the following rule
  • Difference between semi-compiled code and compiled code

    • Web pages
      • include markup
      • End with .aspx
    • Business logic classes, or Objects
      • Compiled
      • Do not contain markup
      • End in .cs (if programming in c#)


Coding



Coding

  • Simple Database Webpage

    • See code


Compiling and Deploying

  • NAnt Targets

    • According to our Default.build
      • nant clean
      • nant dist-clean
      • nant compile
      • nant deploy
  • Copy log4net-net-1.0.dll to your lib directory (lib defined in default.build)

  • Create Virtual Dir in IIS

    • Reads in all .dll files in the /bin dir


Documenting

  • NDoc

    • nant doc
  • Browsing Documentation

    • default.build compiles doc files to the following location, so open:
      • C:\Projects\web2003\doc\web2003\web2003.chm by double-clicking it in Explorer


Upgrading to VS.NET

  • Benefits Gained:



Conclusion

  • Visual Studio.NET has its place

  • Entry into the .NET platform can be made without a major financial investment

  • Learning the framework without having to rely on the VS.NET will give you a more intimate understanding of the .NET classes.



Resources

  • Books

    • Learn the framework, don’t worry about syntax
    • Programming ASP.NET (O’Reily)
    • Professional ASP.NET 1.0 (WROX)
  • Online

    • www.gotdotnet.com
    • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp
    • Google Groups (*dotnet*)
  • Me:

    • pbrannen@idevco.com
    • 703.298.0218



Do'stlaringiz bilan baham:


Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2017
ma'muriyatiga murojaat qiling