This site is no longer active and is available for archival purposes only. Registration and login is disabled.

web application


web application

Postby zortog » Apr 9, 2005 @ 12:47am

zortog
pm Member
 
Posts: 2
Joined: Apr 9, 2005 @ 12:33am


Postby Johan » Apr 10, 2005 @ 4:22pm

If you are willing to use C++ instead of C# you can use the statically linked library version of GapiDraw 3.5 to create an ActiveX component, without the requirement of a DLL on the local machine.
Johan Sanneblad, M.Sc, Ph.D
GapiDraw Systems Architect
[]
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby InexorableTash » Apr 11, 2005 @ 6:43am

Fundamentally, do you want the graphics being rendered on the client or the server?

If it's the client, you'll need some client-side bits. An ActiveX (if you don't mind being IE/Windows-only) using GapiDraw (as Johan suggests) or another technology altogether - for example, you could look into Flash or Java.

If it's server, then you'll be generating images using your server's available libraries. For example, in ASP.NET you can take advantage of the the .NET GDI+ wrapers (System.Drawing) to generate high-fidelity images on the server.

These are radically different approaches than what you were thinking of, but at the end of the day you're building a web app not a client app, so something has to give - either ubiquity of the runtime or a familiar architecture.

Speaking of architecture, the "AJAX" ("Asynchronous JavaScript and XML") buzzword sweeping the 'net lately is another thing to consider architecturally. The basic idea is to realize that most apps that users want to hit on the web are ridiculously simple and modern web browsers are pretty powerful. So you build a fairly deep script-based application that gets shipped down as a web page and just relies on calls back to the server for anything that can't be done locally.

I recently threw together a starmap navigator that feels like Google maps - you can zoom and drag in real-time. The front-end is all script, and it just requests image tiles from the back end - the server runs ASP.NET and uses System.Drawing to produce the tiles on demand. It only took a couple of hours to get everything working,

For a game, you can think beyond image tiles - take advantage of z-index layering (using CSS) and transparent GIFs or Alpha PNGs to do sprites. Nearly everything would be static, too, just like image resources in a "normal" client application using something like GapiDraw.

As an added bonus, the whole thing functions in "retained mode". Most graphics systems (e.g. GapiDraw in its normal use pattern) are "immediate mode" - that is, you're redrawing everything in every frame, and the logic to draw objects and move objects is tightly coupled. With an HTML-based app, the objects are persistent and you just update positions and let the browser do the dirty work.

And this is now completely off-topic. :)

[Edited: I originally gave the acronym as JAXA not AJAX; I claim being bedridden with an illness.]
Last edited by InexorableTash on Apr 12, 2005 @ 3:20am, edited 1 time in total.
User avatar
InexorableTash
pm Member
 
Posts: 99
Joined: Sep 13, 2002 @ 6:14am


Postby Guest » Apr 11, 2005 @ 9:02pm

Guest
 


Postby fzammetti » Apr 11, 2005 @ 9:21pm

Never one to miss an opportunity to plug myself...

I recently published an article on Ajax...



...and I am going to begin work on contributing a chapter or two to an upcoming book on the subject.
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby Guest » Apr 12, 2005 @ 12:37am

To be more specific, if I have a GapiDraw application running at 20 fps and I turned it into an ActiveX control which was getting all the resources it needed from my server, would that be usable on the client side if they were to be able to drag images around the screen in real time?
Guest
 


Postby InexorableTash » Apr 12, 2005 @ 3:23am

Re: every frame coming from the server

No - an ActiveX control is like an "applet" - it's a control (child window) and native code running inside the browser window and process. Fundamentally, there's little difference between a traditional client application (e.g. an EXE) and an ActiveX control except who owns the top-level window and the message pump. Well, and you have to understand COM.

In the past (~8 years ago), doing ActiveX was all the rage if you were in the Microsoft camp (vs. Java for the cross-platform camp); it was a one-click way to get your executable code onto the user's machine. Nowadays, it's clear that security concerns trump everything, so downloading native code that doesn't run sandboxed is something people don't want to encourage, and XPSP2 ups the number of clicks and security dialogs. (Basically, any code you download owns your system, so you'd better trust it with your life.)
User avatar
InexorableTash
pm Member
 
Posts: 99
Joined: Sep 13, 2002 @ 6:14am


Postby Guest » Apr 12, 2005 @ 8:12am

Ok, I think I'm up to speed for now. Thank you very much for your help and time, I really appreciate it :)
Guest
 


Postby Guest » Apr 13, 2005 @ 7:13pm

Sorry to ask ActiveX technical questions here, but I've had some trouble finding an active ActiveX forum.

I've placed my GapiDraw application into a static library and I am able to get it to start up in an ActiveX control by passing in the control's HWND and HINSTANCE.

The problem I'm having though is that my image resouces don't want to load using the passed HINSTANCE. Secondly, while I'm sure the application is running; ProcessFrame is getting called repeatedly - I don't get any mouse click events.

Can anyone help?
Guest
 


Postby Guest » Apr 13, 2005 @ 8:12pm

Or if the question above is no good, then how about this...

I've now placed my application directly into an activeX control, rather than using it as a static library. Now when I open the control in ActiveX Control Test Container, I get a message box saying:

"This display card does not support(640x480x16BPP)@75Hz."

I then hit ok and another message box comes up with:
"Could not open display. Error code=0xc8660110."
Guest
 


Postby Johan » Apr 13, 2005 @ 8:21pm

Try using "CGapiDisplay::CreateOffscreenDisplay". I would recommend NOT using the GapiApplication framework.
Johan Sanneblad, M.Sc, Ph.D
GapiDraw Systems Architect
[]
User avatar
Johan
pm Member
 
Posts: 1843
Joined: Jan 12, 2002 @ 12:38pm
Location: Sweden


Postby Guest » Apr 13, 2005 @ 10:45pm

Ouch...thats going to take me a bit - thanx though:) I'll see if I can do it
Guest
 


Postby Guest » Apr 19, 2005 @ 8:02pm

OK I got the activeX control working finally! It ends up not being hard at all and I was able to use the GapiApplication framework. Now I just need to figure out how to put the control in a browser.
Guest
 


Bumped for help reasons

Postby jeder » Aug 11, 2005 @ 7:56pm

jeder
pm Member
 
Posts: 1
Joined: Aug 11, 2005 @ 7:50pm


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron