Posted by david on 31. January 2009 19:29
just playing around a little … making yesterday’s work a litle better
2008_01_31
I put the input/output boxes inside of an AJAX updatepanel,
added an updateprogress image –
a) cuz the geocode takes a few seconds &
b) cuz I had never done it before.
the time it takes to geocode is of concern …
is there a way to batch ‘em?
animated gifs
AJAX Activity indicators Animated GIFs designed to indicate your site is doing something
When I started, today, I first wanted to separate the tokenservice from the codebehind … as a component. first attempt failed & I lost faith, for now. went back to the easier stuff.
But won’t last long … i’ve got to separate it: given an address, return a lat/long. That will be a must, when I have a giant list of parks.
next step, back to the map, reintroducing the db
but first - to the basics & what these past few days trouble has been all about:
web services:
“Although Web Services are normally used to allow different operating systems, object models and programming languages to send and receive data, they can also be used to dynamically inject data into an ASP.NET AJAX page or send data from a page to a back-end system. All of this can be done without resorting to postback operations.” ( source )
SOAP
Trying to figure out components & MVC & how they relate … one angle I had followed in the web service adventure was to create a component & put the service code in there. Looked good for a while, but I ran into all the messes & abandoned that path – following the straight & narrow tutorials. Last night, I took another swing at it – but failed again. Think I was not ‘seeing’ my services from with the component. Course, I might be completely off base too.
(Macdonald, p789) “A component, at its simplest, is one or more classes that are compiled into a separate DLL … provide some unit of logically related functionality. You can access a component in a single application, or you can share the component between mutltiple applications. … your web pages can use the classes in your component the same way they use any other .NET class … your component is encapsulated … component-based programming is the basis of good ASP.NET application design.”
sounds good, eh?
Create a new class library project ( or add one to your existing project ) …
give a namespace, or nested namespaces …
add some classes.
If the component is in the same project, add a project reference.
If the component is in a different solution, add an assembly reference.
Once you’ve added the reference, mention it where you want to use it.
A good summary article on MVC. My interest there was a) xuz the high priests of development keep talking about it … b) my buddy, Matt, an all star developer sez he’s working in it … and d) it’s built for testing … when I google ASP.NET testing, MVC is what results. …. But, later. I had better learnt to walk before flying – or however that metaphor goes.
I guess the real next action, then, is to get my geocode service stuff back into a component & figure out how to make it work.