Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » AJAX the easy way

This thread is locked; no one can reply to it. rss feed Print
 1   2 
AJAX the easy way
Neil Walker
Member #210
April 2000
avatar

Hello,
I know everyone hates the phrase Ajax, but has anyone seen the new plug-in for asp.net. You really can't not be impressed by it all, especially those beavering away hard at it with dynamic database content in java or php ;)

http://ajax.asp.net/default.aspx?tabid=47
just click on the 'scotts to do list', or it's here
http://download.microsoft.com/download/0/f/6/0f651a0f-6f2b-4497-b061-e1b2825e22e0/MSAJAX-ToDoList.wmv

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Dustin Dettmer
Member #3,935
October 2003
avatar

Most of MS's ajax products I've seen are pretty un-inspiring. The company I work for is obsessed with them though.

Neil Walker
Member #210
April 2000
avatar

Watch the video and tell me you weren't inspired. You're probably talking a good day or more to do that much functionality in php or java.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Dustin Dettmer
Member #3,935
October 2003
avatar

Why would I implement AJAX using php or java?

Neil Walker
Member #210
April 2000
avatar

I'm talking the whole thing, creating a dynamic database driven page with asyncronous updating of the page.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Dustin Dettmer
Member #3,935
October 2003
avatar

[edit (misread post)]
I'm just saying there are good AJAX libraries out there, both free and commercial. So far I haven't seen anything particularly noteworthy from MS. Although that might change.

Matthew Leverton
Supreme Loser
January 1999
avatar

I haven't quite fallen asleep yet... So far I'm thinking, "I'd already be done with my PHP based framework." I'll keep waiting for something cool to happen.

Update #1: Woah, they are copying and pasting huge chunks of code and leaving duplicates everywhere. I hope that's not common practice.

Update #2: I loved how he made sure to emphasize a couple times NOT to put a sleep(2) on your production server.

I am completely unimpressed by the video. The method he was using was hardly maintainable and was simply copy and pasting a bunch of crap that made the source horrible to read. I'd have to actually implement something that didn't look like a nerdy front-end to a database to be impressed.

Maybe someday I'll put together a similar video showing how to do it using a real man's method, which includes actually having a clue about what's going on in the background. ;D

nonnus29
Member #2,606
August 2002
avatar

I don't know, I didn't find the movie to be all that impressive. As presented it merely replaces the burden of coding a database enabled (with ajax) webpage in whatever technology (php, jsp, asp) to learning the developer studio plugin and libraries it has.

The guy in the video seems to know dev studio very well, and certainly seems to be highly productive. But then that is a trivial little application with zero design behind it. So that's a bit misleading, in my estimation. It's easy to be productive on the simple parts, it's working on a large project as part of a team (optionally with the requirement to interface with a legacy application) were things get complex. And the ide doesn't help you out much there.

Neil Walker
Member #210
April 2000
avatar

I'll get my coat then ;)

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Matthew Leverton
Supreme Loser
January 1999
avatar

What I mean is, they might as well have just dragged this onto the page:

<asp:TodoList ajax="true" />

it would have been quicker.

Neil Walker
Member #210
April 2000
avatar

I know it's all noddy code, but the principle remains the same, that you can be far more productive inside visual studio due to the integration between the ide, the code, the wizards and the other tools (such as the data modeller, etc).

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Matthew Leverton
Supreme Loser
January 1999
avatar

Maybe someone who doesn't know what he's doing can be, but that's only because he would be clueless without it.

I could easily introduce that same level of functionality in a 20 minute video, and I believe the audience would actually end up feeling like they understood what was happening behind the scenes. It would require a bit more code, but not a whole lot.

nonnus29
Member #2,606
August 2002
avatar

I agree with Matthew. Using the tool vs not using the tool is about the same level of complexity. Only by not using the tool you actually learn whats going on as opposed to... learning the tool. :-[

Dustin Dettmer
Member #3,935
October 2003
avatar

Yes but learning the tool instead of the background means that you cannot use a library that isn't MS! You cant discount that benefit.

Jakub Wasilewski
Member #3,653
June 2003
avatar

Quote:

You cant discount that benefit.

Sure, it's a great benefit. For MS, at least :).

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Ariesnl
Member #2,902
November 2002
avatar

I thought Ajax was a dutch soccer club ;D:P

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

miran
Member #2,407
June 2002

I thought Ajax was a dutch football club ;D:P

--
sig used to be here

axilmar
Member #1,204
April 2001

Interesting! But here is a potential better way:

1(database db1
2 (table name=tasks (
3 (column name=TaskId type=int)
4 (column name=Name type=(varchar 40))
5 (column name=Completed type=bit)
6 )))
7 
8(page main title="Scott's ToDo List" (
9 (combobox status text="Status" values=["active" "completed"] value="active")
10 (grid tasks source={select * from tasks where completed = {status.value == "completed"}} insert=true delete=true)
11 (pane title="add task" (
12 (textbox name name="Name")
13 (checkbox completed name="Completed")
14 (button name="Insert" click={insert tasks [Name=name.value Completed={completed.value == "completed"}]})
15 (button name="Cancel")
16 ))
17))

For all the time spent in developing ASP, Ajax, Web Developer, etc Microsoft could spent in developing a decent functional programming language with DSL capabilities and spare us the trouble of having to spend 20 minutes in clicking for a program that's 15 lines of code...

CGamesPlay
Member #2,559
July 2002
avatar

Stupid LISP Isn't Server Pages... :P

Eh, AJAX isn't hard. This is handy.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Derezo
Member #1,666
April 2001
avatar

Quote:

which includes actually having a clue about what's going on in the background. ;D

That's the biggest drawback to .NET if you ask me. I have no idea why it works or what it's doing. :(

I prefer PHP/Smarty still.. but it takes a lot less time to whip together a more complex page (but simple code) with C#. The AJAX video looks rather impressive to me, but I hate drag-and-drop coding >:(

I wish the company I work for used PHP instead :(

"He who controls the stuffing controls the Universe"

axilmar
Member #1,204
April 2001

Quote:

Stupid LISP Isn't Server Pages...

1. LISP is not stupid. Those who don't understand it are doomed to re-invent it.

2. My comment has nothing to do with ASP.

nonnus29
Member #2,606
August 2002
avatar

Quote:

Stupid LISP Isn't Server Pages...

Don't let Paul Graham hear you say that, he got rich with a lisp based web application (rtml).

Michael Jensen
Member #2,870
October 2002
avatar

Being a .NET person I've been impressed with atlas/ajax since I first saw it.

You can cause user controls, etc to do invisible posts to the server without mucking each other up, make your datagrids etc not require post backs for things like "edit" -- a text box will just show up... --- all this WITHOUT changing any of your applications existing code...

All I had to do was create a script manager, throw it on the page -- put the controls I wanted to not post back inside of an update panel (basically a div) and I was done. Adding ajax to an existing program that doesn't already have it probably takes under 2 minutes per page.... (I'd like to say ~30 seconds, but I wanted to be safe...)

I've written my own client side ajax code before, and that was easy for what it did, but the integration with asp.net is a lot smoother...

Neil Walker
Member #210
April 2000
avatar

When I use the STL, I couldn't give a fuck what code is behind it. I simply want to use it. That's the .NET shift, you don't have to give fuck about writing a whole bunch of code (though it is nice if you know what it is you're doing), it's all about component based gui development.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

CGamesPlay
Member #2,559
July 2002
avatar

Quote:

That's the .NET shift, you don't have to give fuck about writing a whole bunch of code

That's crazyness! You most certainly do need to know when to use an anchor and when to use a LinkButton, or when to processes form input in user code, or when to check for validation. Despite anyone's best efforts to the contrary, you still need to know the difference between a GET and a POST.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

 1   2 


Go to: