Blaze DS via Ajax with ColdFusion - javascript

I want to use Adobe's Blaze DS via ColdFusion through Ajax. I know enough ColdFusion and JavaScript to do what I want to do, but I want to add long poling into the application and it looks like the only way to do that is through Blaze DS...but I don't know enough about Flash/Flex to finish the job. Anyone know of an Ajax Mockup that works?

Using the Flex Ajax Bridge
The Adobe® Flex® Ajax Bridge
(FABridge) is a small, unobtrusive
code library that you can insert into
an Flex application, a Flex component,
or an empty SWF file to expose it to
scripting in the web browser.
http://livedocs.adobe.com/flex/3/html/ajaxbridge_1.html

Just found out about this today. Maybe easier than BlazeDS+Flex+Ajax?
http://www.ape-project.org/

Related

How to deal with js templates duplication of server code?

I've noticed that I often duplicate razor code by making javascript templates for ajax loading. And then if I want to change serverside template I have to change js template too, what can I do to minimize such duplication? Thanks for answers, and forgive my english:)
One of the possible solutions is to use the same template engine on the server side and on the client side for the specific purpose of AJAX requests.
Mustache is a good choice - it's available both for .NET platform and for JavaScript.

Kendo UI Alternative to MVC

I have successfully developed a simple grid using MVC 4 and kendo UI. Everything works as expected and I dont have an issue with it. The other day, I was talking to another developer who told me that I could completely bypass MVC and just use a Javascript to read from SQL Server(my data source) and call it on my HTML page. There, I could use Kendo UI helpers to display the page the way I wanted.
My question is, is that possible? And if it is possible, is it advisable? I primarily work only with databases and this is the first time I am playing with MVC, Kendo and HTML as such, so please bear with me.
Thanks for the help.
Your colleague is absolutely right. You can use the client version of Kendo UI and write jQuery code on HTML/.cshtml/aspx... files and connect to your MVC/Web API controllers or a RESTFul/HTTP service using Ajax calls. This will work like a charm.
This is advisable only if you are good with Javascript/jQuery. This method will provide better user experience and you can easily build Single Page Applications which is the future of web apps.
if you see Kendo UI demos, all the examples are built on pure HTML pages using jQuery.
I hope I answered your question clearly, but in case you need any clarifications, feel free to ask.

java script website best practice

I am building a website using the below stack. For this question, I think the software stack should not matter. I am more interested to know whether the way I am doing the project seems like a good idea or following the best practice.
- Twitter Bootstrap for the UI
- CherryPy
- jQuery
So the way I approached the project is like the below
- Use the Twitter Bootstrap to create the basic layout
- I have one js file and one css file for my project
- Based upon the requirement, let say for this button I need to do something like ajax call
- go to the js file and write like $("#id").click() and do the necessary stuff
- write the necessary action code in python
- Test
So basically, what I am doing, modifying the html file, adding the necessary code that I need in my single js file and do the python code. Seeing all this java script framework like backbone.js, require.js makes me feel that maybe I am not following the best way to do it.
In a sense, what I want to know is that assuming you have a website with few pages that does not have heavy user interaction how would you do it? Is there anything wrong the way I am approaching it? What would be best way to do it?
Thanks
Client side frameworks like Backbone, Angular, and Ember are built to help bring structure to heavy javascript applications. Don't get confused between a client side language like javascript (although now it can be used as a server side language to) and a server side language like C#, Python Php etc.
Most Single Page Applications consume a REST API. So all your functionality will be on the client side. Your server's primary responsibility is to push data to your client so the user can interact with it. Think of your client (written in js) and server(written in python) as two completely separate entities/apps.
If your application is not javascript heavy, I would not go with a Single Page Application and use your current listed tech stack. I would always recommend keeping your javascript structured, but you dont need a framework for this. Just follow one of the js patterns you feel most comfortable which can be listed here.

What is the best way to display xml information on a web page?

I've currently got a service that produces xml files every 10 seconds containing server information. I'm looking for a way to display this on a web page.
I have been looking on the web for the best way to do this and it seems that using AJAX would be good as it allows the loading of dynamic content to be done in the background.
However how can i use AJAX? Should i add a ASP.NET website to my visual studio project? OR should i look to use javascript & AJAX in something like dreamweaver?
I'm very new to programming so i only really have a bit of experience in vb.net.
Any help would be much appreciated!!
I'd use an ASP.NET page and use the built-in AJAX ScriptManager and UpdatePanel controls. They are very easy to incorporate.
Also, you don't want to bombard people with Raw XML, so learn to use XSLT. I would suggest rendering it on the server using the XSLCompiledTransform. Do this on the server, as you can mix and match the ASP.NET controls and HTML server controls. I would suggest creating a <div runat="server">, place this in the UpdatePanel, and render XML via XSLT to this.
I'm not a .net developer so i don't know nothing about .net controls. But maybe you should take a look into jQuery and its ajax capabilities.
http://api.jquery.com/jQuery.ajax/

Using asp.net ajax client side framework on a bare-bones HTML page

I want to use the asp.net ajax client side framework on a bare-bones HTML page. Firstly, is it possible? If yes, then can someone point me in the right direction?
Yes, it is possible. You need to include MicrosoftAjax.js and start using it. For further reference you can check the following links:
Microsoft Ajax Client Reference
Using Microsoft Ajax with PHP
In a word you need to include the file and start using the API. What exactly do you need from ASP.NET Ajax? Have you considered using jQuery instead? My experience tells that ASP.NET Ajax is suitable for ASP.NET only cases (web-forms, server controls, partial rendering etc) whereas jQuery is more close to the metal and works with all server platforms.

Categories