Monday, July 10, 2006
Tuesday, January 10, 2006
.NET Web services
Essentially, Web services are a way of interacting with objects over the Internet. The HTTP protocol is typically the transport of choice, although theoretically, other protocols should work (anyone have good examples of this?).
In the .NET world, there are three protocols you need to be aware of:
- SOAP (Simple Object Access Protocol)
- UDDI DISCO
- WSDL
You can use wsdl.exe to generate a proxy class. You use the proxy class to invoke the Web service.
Tuesday, December 27, 2005
Web.Config Element Nesting
<configuration>
<system.web>
<compilation
defaultLanguage=""
debug=""/>
<customErrors mode="" />
<authentication mode=""/>
<authorization>
<allow
users=""
roles=""/>
<deny
users=""
roles=""/>
</authorization>
<trace
enabled=""
requestLimit=""
pageOutput=""
traceMode=""
localOnly="true"/>
<sessionState
mode="InProc"
stateConnectionString=""
sqlConnectionString=""
cookieless=""
timeout=""/>
<globalization
requestEncoding=""
responseEncoding=""/>
</system.web>
</configuration>
Friday, December 16, 2005
ASP.NET Globalization
Here is a short list of some things that are commonly localized:
- Menu item text
- Form layouts
- Dates and Time
- Currency
- Numbers
- Calendars
At a minimum you should take a look at the CultureInfo class in the System.Globalization namespace.
Take a look at CurrentCulture and CurrentUICulture. Understand that CurrentUICulture is used by the CLR when choosing language resource files and that CurrentCulture is used for formatting dates/time, currency, numbers, etc. Make sure you are clear on how these classes tie into the System.Threading.Thread class.
Make sure you know what an Invariant culture is and the reason why it is used.
Take a look at working with localized Calendars. Write a quick test app which works with them.
Spend some time with resource files and the naming conventions you must use in order for the CLR to choose the right ones (i.e.: En-us, Fr-fr, etc.).
Undertand about character encodings and what you need to do in order to convert UTF-16 to UTF-8, etc.
About mirroring...make sure you know about the <HTML dir="rtl"> tag and property combination and when you'd want to use that.
Tuesday, December 06, 2005
ASP.NET Web Forms Part 2 - Controls
The bottom line with controls is that you really need to have a solid grasp on each one. The best way to do this of course, is to sit down and write some code. At the very least, you should know the following things about each control:
- Does it support AutoPostBack?
- Can it cause validation?
- What class does it inherit from?
- What events can it handle?
I won't be going into the DataGrid or the DataList control here. I'll cover them in depth in the Data Manipulation part.
Here's a table that shows the basics for each control. I'll be covering each control in detail in other posts.
| Control | Auto Post Back? | Validates? | Inherits | Events |
|---|---|---|---|---|
| Label | -- | -- | WebControl | |
| TextBox | YES | YES | WebControl | TextChanged |
| Image | -- | -- | WebControl | |
| CheckBox | YES | -- | WebControl | CheckedChanged |
| RadioButton | YES | -- | CheckBox | CheckedChanged |
| Button | -- | YES | WebControl | Click Command |
| LinkButton | -- | YES | WebControl | Click Command |
| ImageButton | -- | YES | WebControl | Click Command |
| DropDownList | YES | -- | ListControl | SelectedIndexChanged |
| PlaceHolder | -- | -- | WebControl | |
| Panel | -- | -- | WebControl | |
| AdRotator | -- | -- | WebControl | AdCreated |
| Calendar | - | -- | WebControl | DayRender SelectionChanged VisibleMonthChanged |
| HyperLink | -- | -- | WebControl | |
| ListBox | YES | -- | ListControl | SelectedIndexChanged |
| Literal | -- | -- | Control | |
| PlaceHolder | -- | -- | Control | |
| Repeater | -- | -- | WebControl | ItemCommand ItemCreated ItemDataBound |
Monday, December 05, 2005
ASP.NET Web Forms Part 1 - ROCIPRIA
I took a few assessment tests and noticed very quickly that I needed to at least memorize the ASP.NET page directives. You'll find that some of the answers to the questions can be ruled out because they either include Directives that don't exist or include incorrect Directive/Attribute pairs.
To make it easer I devised a simple acronym to help me remember the names of the ASP.NET Directives.
Register
OutputCache
Control
Import
Page
Reference
Implements
Assembly
Make sure you have solid knowledge about what each of these Directives does as well as what attributes can go with each one. Obviously, in the real world it takes only a couple of seconds to find this information in a book or online, but the point is that you're not going to have any reference material when you go to take the exam.
ASP.NET Web Forms - Introductory Notes
You need to know that an ASP.NET Web Form inherits from System.Web.UI.Page and ultimately inherits from System.Object.
You need to know that Page events fire in this order:
You also need to know that OnInit() fires the Init() method. Any class that derives from System.Web.UI.Page and overrides the OnInit() method must remember to call MyBase.Init(e) at the end.
You need to know that any code that interacts with controls should not be placed inside the Init() method but should be placed in the Load() method. PreRender() is the last stop before the results are sent off to the browser. UnLoad() should be used for clean up, etc.
You need to have a solid grasp of event handling, delegates and the reason why setting AutoEventWireup to True will cause any overriden event methods to fire twice when you work with a Web Form created by VisualStudio.NET
Make sure you know basic OOP principles and terminology, i.e.:
You need to know that namespaces are a way of hierachically organizing classes. You also need to know how the compiler deals with classes with the same name that exist in different namespaces. For example:
Imports Customers
Imports Employees
Dim oOrder as New Order
If both Customers and Employees namespaces contain a class called Order the compiler will match the oOrder object with the Customers namespace.
You need to understand the process by which IIS handles requests for .ASPX pages.
- 1). When an HTTP request is for a file with a .aspx extension, IIS passes the request to the appropriate ISAPI DLL. In this case, it would pass the request off to aspnet_isapi.dll
- 2). aspnet_isapi.dll passes the request to aspnet_wp.exe (the aspnet worker processs) which handles the request.
- 3). aspnet_wp.exe compiles the .aspx page into an assembly, creates an app domain and tells the CLR to execute the compiled code. (The compilation doesn't always happen in this step. It happens if an assembly hasn't been created because it's the first time the aspnet_wp.exe has received a request for a particular .aspx page, or the date/time stamp of the .aspx page is older than the assembly in which case the aspx page has changed and needs to be recompiled.)
- 4). aspnet_wp.exe collects the response, packages it up and passes it back to IIS.
- 5). IIS sends the request back to the browser.
14 Areas of Concentration - Exam 70-305
If you want to feel like you are well prepared for the exams then you should spend the time and make sure you are at least familiar with all of these areas:
- Web Forms
- Error Handling
- Data Binding
- Consuming and Manipulating Data
- .NET components and assemblies
- Web Services
- Globalization
- Legacy Code
- User Assistance and Accessibility
- Testing and Debugging
- Deploying
- Maintaining and Supporting
- Configuring
- Web Browser vs Smart Device development
I have a big problem with the Data Access/Manipulation topic. Arguably, you should not be running database code from your presentation layer. There should be a data access layer for this. I think it's poor practice to encourage this kind of development by making sure that it is on this test. Likewise, I've never found a good use for data binding. I think it's a cheap and dirty way to whip up a web page and should not be treated as a real approach to developing presentation code.
That said however, it IS going to be on the test so you need to study for it and at least know what it is even if you don't agree with the techniques or plan on using them in real-life.
I'm going to break the blog out into sections. I'll start with Web Forms and cover some of the key ideas you should know before taking exam 70-305.
Each blog post will be titled with the Area of Concentration and then a part number, i.e., Web Forms Part 1.
Monday, November 28, 2005
MCAD This
You are MCAD certified when you pass 3 exams. Two of the exams are core and one is an elective. At the time of writing this, to take a test costs roughly $125. I believe the benefits of becoming certified will more than pay for the $375 to take the tests. The company I work for will reimburse the costs of the test (if I pass).
For general information about the MCAD certification process and requirements, as well as what exam combinations are accepted, please visit here.
The three tests I will be taking (in the order I will take them) are:
- Exam 70–305: Developing and Implementing Web Applications with Microsoft Visual Basic® .NET and Microsoft Visual Studio® .NET
- Exam 70–306: Developing and Implementing Windows-based Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET
- Exam 70-310: Developing XML Web Services and Server Components with Microsoft Visual Basic .NET and the Microsoft .NET Framework

