Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Learning Question

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
Hello to my fellow developers.

I'm an applications guy wanting to learn web development. I had someone tell me I needed to get a few things under my belt like soap, AJAX, web services, XML, and e-commerce.

What's the order of learning here? I'm not starting from scratch but I feel like I am. What to learn first?
How does it all fit together.
Microsoft's site speaks in another language all together.

Is there a bigger market for C# guys? Sorry, don't mean to ask that here, but it's relevant.

Thanks for any and all help.
 
what you need to learn is what ever technologies you need to complete your project. I've programmed web apps for a few years now and no nothing of e-commerce. It hasn't been required for the projects I develop.

AJAX, WebServices, SOAP, XML, etc. these are just tools (buzzwords) for developing web applications.

you don't need any of these things to create a website/application. however AJAX/WebServices make a web applications prettier & appear to execute faster.

XML is just text. data is defined by tags, must like html. Another buzzword is JSON. it's crudest definition is xml without the fat.

I would say a solid understanding of stateless development (web) is important. under this point is knowing the differences between a windows application and a web application.
I would list the asp.net page life cycle as the 2nd more important thing to know about asp.net development.
everything else to know falls under these to points.

I think c# is easier to translate into other languages. so if I find a php or java example it translates easier to c#. I also can't stand how wordy VB is. These are just personal preferences though.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thanks Jason

I was recently talking to a job recruiter who was telling me what companies are hiring and he mentioned these buz words.

I've been a developer now for about 20 years and web is my downfall (for now).
The place I'm currently working is going all web so this I must learn or drown.
So that's where I'm at. Besides, it sounds like a lot of fun, except for M$ grid control that I have cursed at for a while. LOL
I've done a few order entry programs on the web and it seemed to be to be easy; read and write to a database.

Thanks again.
 
the M$ grid is great for developing the M$ way. however it's a pain to get this working in any sort of MVP setup. I created a simple interface/wrapper object to pass specific properties of the grid back to the presenter. it's limited, but it works.

the less logic your web app needs, the easier it is to debug/test. if you mix db access, business logic and presentation into the code behind it will be very tedious to track down the issue.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
I'd like to see your grid wrapper and what you did.
After working at my last company with the Component One grid, the M$ grid lacks big time.

And don't mix db access, business logic and presentation into the code behind? Then what is the alternative? Is this this 3 tear all the people are talking about?

Being an VB6 application guy, I hardly ever put any code into my forms, except the code dealing with the controls on that form. Any database code came from my DB class.

The way the ASP book said and I posted this before was to use this SQLDataControl that talked to the database. It's hoaky but it does work in a pinch.

I also messed with the Data Tables built into asp.net and they were buggy too.

I'd much prefer to fill a dataset and pass it to the form rather then use these controls.
The controls are really hard to debug, and I went crazy figuring out that without a primary key on one table, they stopped working.

Oh BTW, my code behind lives on a separate aspx page rather then in the page itself.

Some of my logic I built into classes, am I on the right track?

Any and all help would be great, and thanks so much.
 
bigfoot said:
I hardly ever put any code into my forms, except the code dealing with the controls on that form
that's exactly what i mean.the more code you can move into the bll/dal/pal the better. as this code could be tested without using the gui.

I can't stand the drag/drop datasource controls. they scream RAD M$ development, but aren't good for the long term solution. the closest control is the ObjectDataSource control. this at least seperates the bl from the gui.

bigfoot said:
Oh BTW, my code behind lives on a separate aspx page rather then in the page itself.
i would try to take this one step farther. the code behind is just a simple wrapper for a view. a presenter/controler would do all the real work.

bigfoot said:
The way the ASP book said and I posted this before was to use this SQLDataControl that talked to the database. It's hoaky but it does work in a pinch.
unfortunately. 99% of the materials available preach the M$ way. I have found only a hand full of useful references for good oop design.

I consider myself a novice for good oop skills. it's only something I started embracing 18 months ago. and being the only developer, my only mentor is the web.

that said I have found 2 references that really helped me grasp the mvp/unit testing process.
1. code project article on mvp. this is a good compromise between the asp.net model and testability. i can use the features of asp.net controls and the ms ajax library whie seperating my gui from presentation logic. castle project has mono rail project which is a true web mvc. although this is a drastic shift is how a webpage operates. more like php then asp.net.
2. Jean-Paul Boodhoo. not specificly related to web, but a great resource for true agile/oop programming. he also wrote an msdn article on web mvc, which i also incorporate into my projects.

as for my girdview wrapper. it' isn't much
Code:
public interface IDomainObjectControl
{
   int PageIndex {get;set;}
   int PageSize  {get;set;}
   int EditIndex {get;set;}
   IEnumerable<string> DataKeyNames {get;set;}

   void BindTo(IEnumerable data, int virtualItemCount)
   IOrderDictionary GetRowKeys(int rowIndex);

   event EventHandler<EventArgs<IEditParameters>> Editing;
   //repeat each event in the data controls. 
}
public interface IEditParameters
{
  int NewEditIndex {get;}
  bool Cancel {get; set;}
}
I needed a way to pass the event args to the presenter without requiring the System.Web reference in the pal. so I created an interface for each parameter that implements the exposed properties.
EventHandler<EventArgs<T>> is something i picked up from Jean Paul's blog

now for implmentation
Code:
public class GridViewDomainModelControl : IDomainObjectControl
{
   private GridView grid;

   public GridViewDomainModelControl(GridView grid)
   {
      if(grid == null)
      {
         throw new ArgumentNullException("grid");
      }
      this.grid = grid;

      //hook my events to gridview events
      this.grid.RowEditing += delegate (object sender, GridViewEditEventArgs e){
            if(this.Editing != null)
            {
               this.Editing(this, new EventArgs<IEditParameters>(new EditParameters(s)));
            }  
      };

      //repeat for each event
   }

   //properties are pretty striaght forward
   public int PageIndex
   {
      get { return this.grid.PageIndex; }
      set { this.grid.PageIndex = value; }

   }

   public void BindTo(IEnumerable data, int virtualItemCount)
   {
      this.grid.Datasource = new SimpleDataSourceControl(data, virtualItemCount);
      this.grid.DataBind();
   }
}

public class SimpleDataSourceControl : DataSourceControl
{
   private IEnumerable data;
   private int vic;

   public SimpleDataSourceControl(data, vic)
   {
      this.data = data;
      this.vic = vic;
   }

   protected override DataSourceView(string viewName)
   {
      return new SimpleDataSourceView(this, viewName, this.data, this.vic);
   }
}

public class SimpleDataSourceView : DataSourceView
{
   private IEnumerable data;
   private int vic;

   public SimpleDataSourceView(IDataSource owner, string viewName, IEnumerable data, int vic)
      : base (owner, viewName)
   {
      this.data = data;
      this.vic = vic;
   }

   public override bool CanRetrieveTotalRowCount{ get { return true;} }

   protected override IEnumerable ExecuteSelect(DataSourceSelectArguments arguments)
   {
      arguments.AddSupportedCapabilities(DataSourceApabilities.RetrieveTotalRowCount);
      arguments.RaiseUnsupportedCapabilitiesError(this);
      arguments.TotalRowCount = this.vic;

      return this.data;
   }
}
if you need more options (sorting/paging) over ride the appropiate properties and then add the capability to the argument before calling RaiseUnsupportedCapabilitiesError().

like i said, it's crude, but it works for my mvp needs.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
When you're learning ASP.NET, it's important to remember that all you're really talking about is learning the presentation layer. All other principles of software engineering still apply (layering, loose coupling, OO, etc.).

In a modern software engineering world, I'd agree with the recruiter that learning XML is pretty important, as is knowing about web services, but e-commerce is a nitch, you'll never have to have an in-depth knowledge of SOAP per se, and AJAX's usefulness is limited despite the hype.

If you're wanting to get into the .NET web space, here's what I'd do:

1. Learn C# with an introductory text of your choice.
2. Read an introductory text on ASP.NET 2.0.
3. Learn the design principles of OO and SOA and where each methodology is appropriate. I highly recommend this book: 4. Research (Google) where and where not to use web services, then try creating one in .NET (it's easy).
5. Download ASP.NET AJAX and casually experiment with the AutoCompleteExtender: After that, try creating a page with a GridView on it, and try implementing AJAX sorting with an UpdatePanel. Remember, the minority of web pages you create should use AJAX.

MCP, MCTS - .NET Framework 2.0 Web Applications
 
Thanks again for the help.
I bought 2 books a few weeks back. They seem to be pretty good.

Sams Teach Yourself ASP.NET 2.0 in 24 Hours

While it uses ALL M$ web controls, it does give a nice overview of the web process.

Pro ASP.NET 2.0 in VB 2005

This one is interesting in that it teaches a behind the controls approach to programing. It is not the usual M$ hype type.

Thanks for the book reference but I read another book on design patterns and went to sleep. I got nothing out of it. No code that I could pick apart. It's all theory. When you're new to OOP, theory is boring.
I'd rather play and see what it does. I understand inheritance and interfaces as well as subscriptions but to tell you the truth, I have never had to use any of it when dealing with databases.

Most of the programing work I have done in my career is getting 2 things to talk to each other.
I've become very good at passing data back and forth between to machines that refuse to speak to each other.

I had one job where I worked on a monster application that took years and I was bored to death. The project never ended. LOL
The company was sold and disbanded.

And so now I'm learning web.
 
my friend introduced me to the head first serices. Head First: Design Patterns is easy/fun to read and includes both theory and code samples. The examples are all java based. if you ever programmed in the c# or php the syntax is easy to translate. If you're strictly vb it could be more difficult. either way i believe this is a must have for any programmer.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Yes, I don't think you'll be bored by the Head First book we recommended. In fact, I doubt you'll be able to put it down. It's great! Very entertaining and will change the way you think about programming.

Really, though, if you want to grow as a programmer, you should understand the theory and principles of software engineering or your systems won't be very maintainable or robust.

For example, an e-commerce portal I architected was wrestling with the question of dealing with calculating the cost of a delivery when all the items of an order might come from different shippers. They thought of the problem in terms of a giant function which calculated shipping items one by one using a hard-coded algorithm.

The problem with writing a mega-function for the problem is that the code would have been overwhelming to develop (lot's of confusing conditions) and risky to change (because adding conditions/shippers required modifying existing code).

Thinking of the problem in object oriented terms, however, I used a variation of a "chain of responsibility" to elegantly handle the problem. Instead of a single giant function, I wrote a system where you had a chain of components which first analyized whether or not they should handle the item and second calculated the shipping if so. Any unhandled items were passed to the next "link" in the "chain" until all items were handled.

With this system, I organized the code into "links" for each shipper where each "link" required only a few lines of code to write. This completely simplified a relatively complex problem! Additionally, I made the system more flexible and less risky because adding a new shipper "link" involved extending the system instead of modifying its existing parts.

The potential for this sort of elegance in the web space is where ASP.NET really shines over older technologies like ASP or ColdFusion 4 which were more scripting technologies vs. bona fide enterprise software engineering tools.

At the very least, you need to understand object orientation in the context of ASP.NET development, because you need to understand, for example, what the advantages of the MembershipProvider abstraction are, and what you'd need to do as far as subclassing if to add functionality to the out of the box provider or use a database other than SQL Server.

That said, since you're expressing interest in the nuts and bolts of ASP.NET< you may also like this book:
It probably taught me more about the architecture of ASP.NET than any book out there.



MCP, MCTS - .NET Framework 2.0 Web Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top