Post on 10-Feb-2017
Roger LovingRoger Loving.NET Development.NET Development
Introduction Introduction –– The following slides review my most The following slides review my most
recent .NET development project.recent .NET development project.
Technologies demonstrated are: Technologies demonstrated are: WinForms, ADO.NET, ASP.NET, T-SQL, WinForms, ADO.NET, ASP.NET, T-SQL, SQL ServerSQL Server
N-Tier DevelopmentN-Tier Development
Multiple tiered Solution:
Windows ClientWindows Client: User interface: User interfaceBusinessBusiness: Business rules and entities: Business rules and entitiesData AccessData Access: Interface to T-SQL stored : Interface to T-SQL stored procsprocsStored ProcsStored Procs: Database access: Database accessEntitiesEntities: Business and Exception objects: Business and Exception objects
Business RulesBusiness Rules Encapsulation of discrete business objects and logic Validation of business
entities Use of XML documentation
tags Fully commented
Data AccessData Access Stateless data access tier No direct SQL db access through
ADO.NET Using the Dispose()
objects Custom exceptions
Transact-SQLTransact-SQL
Database security
Network efficiency
Code re-usability
Use of transactions
Stored Proc usage:
Code sampleCode sample Full object oriented programming Use of polymorphism, inheritance, and
n-tier Try/catch blocks Status strips
Web basedWeb based Web Application after
conversion from Windows app
Windows appWindows app Tabbed layout provides intuitive groupings of functionality and compact layout
XMLXML
<?xml version="1.0" encoding="utf-8" ?><Abbreviations xmlns="http://tempuri.org/States.xsd"><State><Name>ALABAMA</Name><Abbreviation>AL</Abbreviation></State><State><Name>ALASKA</Name><Abbreviation>AK</Abbreviation></State><State><Name>AMERICAN SAMOA</Name><Abbreviation>AS</Abbreviation></State><State><Name>ARIZONA</Name><Abbreviation>AZ</Abbreviation></State><State><Name>ARKANSAS</Name><Abbreviation>AR</Abbreviation></State><State><Name>CALIFORNIA</Name><Abbreviation>CA</Abbreviation>
public static DataSet GetStates() { // create a new dataset DataSet ds = new DataSet(Properties.Settings.Default.StatesDatasetName); // read the data from the xml file ds.ReadXml(Properties.Settings.Default.StatesDatasetFileName); return ds; }
XML used to populate a dataset
ConfigurationConfiguration
<?xml version="1.0" encoding="utf-8"?><configuration> <system.web> <authorization> <allow roles="Librarian" /> </authorization> <compilation debug="true" /> <authentication mode="Forms" /> <roleManager enabled="true" /> </system.web> <appSettings> <add key="StatesDatasetFileName" value="~/XmlData/States.xml" /> </appSettings> <system.net> <mailSettings> <smtp from="rloving10@gmail.com"> <network host="smtp.gmail.com" password="xxxxxxx"
userName="roger.loving" /> </smtp> </mailSettings> </system.net></configuration>
use of administration tool and editing of web.config
JavascriptJavascript /* Find the nodes where class="tabbertab" */ if(childNodes[i].className && childNodes[i].className.match(this.REclassTab)) { /* Create a new object to save info about this tab */ t = new Object(); /* Save a pointer to the div for this tab */ t.div = childNodes[i]; /* Add the new object to the array of tabs */ this.tabs[this.tabs.length] = t;
/* If the class name contains classTabDefault, then select this tab by default.
*/ if (childNodes[i].className.match(this.REclassTabDefault)) {
defaultTab = this.tabs.length-1; } } }
/* Create a new UL list to hold the tab headings */ DOM_ul = document.createElement("ul"); DOM_ul.className = this.classNav; /* Loop through each tab we found */ for (i=0; i < this.tabs.length; i++) {
t = this.tabs[i];
/* Get the label to use for this tab: From the title attribute on the DIV, Or from one of the this.titleElements[] elements, Or use an automatically generated number. */ t.headingText = t.div.title;
Javascript is used to create a tabbed menu format