Showing posts with label pretty. Show all posts
Showing posts with label pretty. Show all posts

Wednesday, March 28, 2012

Atlas web service proxy undefined - bug or mistake?

Ok, here's the deal: I have javascript method that is called on the window's load event:

window.onload = function () { getDataForTable();};

Pretty striaghtforward, right? Well, when the getDataForTable method executes it calls an Atlas proxy method:

WebServices.Callbacks.CalendarFunctions.CheckDate(dateField.value, getDataForTable_Callback);
But when the script execute on load, I get an error stating that 'WebServices' is not defined. When I check the HTML output the Atlas javascript reference is there: "text/xml-script">"http://schemas.microsoft.com/xml-script/2005"> <references> <add src="http://pics.10026.com/?src=/Anthem/Callback/CalendarFunctions.asmx/js"/> "text/xml-script">"http://schemas.microsoft.com/xml-script/2005"> <references> <add src="http://pics.10026.com/?src=/Anthem/Callback/CalendarFunctions.asmx/js"/>
<script type="text/xml-script"><page xmlns:script="http://schemas.microsoft.com/xml-script/2005"> <references> <add src="/Anthem/Callback/CalendarFunctions.asmx/js" /> </references> <components /></page></script>
And when I hit the URL above the javascript there looks correct:
Type.registerNamespace('WebServices.Callbacks'); WebServices.Callbacks.CalendarFunctions=new function() {this.path = "http://localhost:64408/Project/Callback/CalendarFunctions.asmx"; this.appPath = "http://localhost:64408/Anthem/"; var cm=Sys.Net.ServiceMethod.createProxyMethod; cm(this,"CheckDate","date"); }

So... here is the question: why is this undefined? I think this is a bug because when I debug the script the ".asmx/js" script is not loaded in the script explorer window like other referenced scripts. So, any work arounds? How else do I get this call to execute during the window.onload event?

Thanks in advance for the help.

The best thing to do I think is to install something like fiddler, and verify that the request going out is in the form you expect, and that you are indeed getting the javascript that you get when you use the script include. Hopefully you'll see something obvious...

Actually I think this might be a timing issue, you are probably calling your onLoad before atlas has a chance to load its scripts, so you can verify that is the case in fiddler. Anyways you probably want to register your getDataForTable on pageLoad or using atlas's ApplicationOnLoad.

Hope that helps,
-Hao


You are right, I added the getDataForTable method after I posted this and it worked - it was just a timing issue. Thanks for the help though!

Monday, March 26, 2012

Atlas verus other AJAX implementations

What will Atlas provide that is compelling versus other AJAX products out there? I've been reading aboutComfortASP.NET and it seems pretty darn good. They provide various methods of incorporating AJAX into your website, including one that requires almost no extra programming. I can't compare the performance aspect of various products, but in terms of usability, they seem to have it right. Any comments?

Hi,

I hope the following link will give you the comparison of ATLAS vs AJAX implementations

http://www.daniel-zeiss.de/AJAXComparison/Results.htm


Atlas also offers Ajax without extra programming: look for the UpdatePanel.

MagicAjax offers a simular solution to UpdatePanels.


With ComfortASP, one of the option allows you to achieve AJAX features without anything special (not even UpdatePanel). I believe they implemented this through an HTTP-module/handler that passes back only the diff of the page. While this takes toll on the server, the result can achieve significant reduction in the data being passed to the client. I suppose you could think of it as a quick-and-dirty, semi-AJAX implementation. Mind you, it's one of several AJAX options they offer, others being closer to the usual AJAX implementations where you do need some coding. I think the idea is a good one and perhaps one that can possibly be considered for Atlas as well.

fyi - I get errors on their demo pages with ie 7

Looks good though - I have used Anthem - it does a good job as well.


One other note: I might need to try one of these solutions because I'm not suspose to use this Atlas for anything by their agreement.

I hope to see Atlas get to a stable point, my clients like what they see in the demo's I showed them - but with no good information and hush hush from many of the developers it makes it a hard sell right now.

Saturday, March 24, 2012

Atlas to RC1 Conversion

I have a pretty big Atlas website which I love. I want to go to RC1 but I hear trying to do that will make me stop loving my atlas website.

Is there a guide that I can use to upgrade from atlas to RC1?

Do you guys recommend that I just wait for the RTM?

Thanks!

Try thishttp://ajax.alpascual.com/Walkthrough/AtlasToAspNetAjax.aspx

Since I posted this I found: http://ajax.asp.net/files/Migration_Guide_CTP_to_RC.aspx

I guess there are A LOT of web.config changes to be made. Thanks for your reply though. I've learned from your posts before.



keenster:

Since I posted this I found: http://ajax.asp.net/files/Migration_Guide_CTP_to_RC.aspx

I guess there are A LOT of web.config changes to be made. Thanks for your reply though. I've learned from your posts before.

Thanks, very kind of you!

Let me know if you have any problem migrating, its pretty straigh forward.


ahh ha! It all works...except for the autocompleteextender. I think that needs it's own post.

I think i was successfull this time because i add to the web.config file that came with RC1 instead of trying to change mine to match it.


Wednesday, March 21, 2012

atlas script reference guide?

I did some searching here and on google without much luck, does anyone know of a pretty good guide to the Xml Scripting in Atlas? It seems quite powerful but a good reference is needed.

Thanks

S

By XML scripting I think you mean declarative markup, if so all the readable documentation is on atlas.asp.net. As for scripting the best documentation at the moment is the debug code.

Atlas pulling back DataGrid

I'm pretty sure I can sell my boss on ASP 2.0 and ATLAS because of the non-post back. Pulling data from a DB.

Only, I don't know how to code Atlas to pull back say a datasource and put it into a datagrid without post back.

Any sample code anyon has done that they can share? I want to get something up quick, something small.

Click button and show data from a table.

I'm still reading through the tutorials.

I try the code at

http://atlas.asp.net/quickstart/atlas/doc/data/default.aspx#datatable
http://atlas.asp.net/quickstart/util/srcview.aspx?path=~/atlas/samples/data/datatable.src

Even their example comes up blank.

I copied the code and change the SQL connection and select statement, also changed the <label targetElements>'s to match table field names.

I get no data returned either like their example.

Secondly, how do you add a button to initate the data pull instead of just loading it.


I guess no takers. Or even point me in the right direction as in what to search on.

Mastro,

The Atlas UpdatePanel server control actually makes it super easy to turn any ASP.NET 2.0 GridView or other control into an AJAX-style UI with efficient postbacks.

If you have a GridView that is bound to a data source control, you can make it update without postbacks by doing the following:

1) Add an Atlas:ScriptManager control to the page, and setting the EnablePartialRendering property on it to true.

2) Enclose the GridView in an Atlas:UpdatePanel control, putting the GridView inside the UpdatePanel's ContentTemplate.

3) If you want to be able to add items, you can also add a DetailsView or FormView control to the page, and set up a trigger to update the GridView automatically.

Scott's weblog has a great post, with full sample code, that walks you through setting up a GridView bound to a datasource, and then enabling it for Atlas postbacks. You can find it athttp://weblogs.asp.net/scottgu/archive/2005/12/26/433997.aspx.