Will Dart work with ASP.Net? - asp.net

I haven't been able to find any information concerning Dart and ASP.Net. I assume it will be compatible since you can run JavaScript with ASP.Net. Still, though, it would be good to make sure. Does anyone know the specifications for this?

If used as a client-side technology -- yes, Dart should work just fine.
However, as detailed here, Dart is intended for server-side as well as client-side use:
Developers have not been able to create homogeneous systems that encompass both client and server, except for a few cases such as Node.js and Google Web Toolkit (GWT).
This, combined with its current lack of support in Microsoft browsers, may well limit its appeal to Microsoft developers.

Dart can be complied into Java Script , so for us , heavy weight .NET or Java developers with all our heavy ASP.NET and server side architecture machinery , I believe Dart will be a great finally easy to use 'java script' compiler -- for all the times you got messy , full of bugs , hard to test or decode .JS files.
In fact , it is long claimed that Google uses some in-house java script compiler to build Gmail and Google+ , so many guess they simply expose many of their already existing infra's to the world.
#Jeremy McGee , I think you are incorrect as Dart can be compiled to Java Script and run on any browser.
What you are talking about is Dart virtual machine , which is currently supported only in new preview state Chromium web browser.
This virtual machine aims to work faster as it does not need to compile itself to java script.
ALSO , if you know about Google's vision to have a web browser OS , dart is their way of attracting developers to this web browser new OS , as it will be easy for developers to write new apps for it , also fits to their new HTML 5 / JS applications for current version of Google Chrome and Google Play for Android market .
Not far from now , you will be able to write Dart apps for Android .
Microsoft on the other hand are running towards HTML embedded for Windows 8 new run time engine which supports JS for writing new windows applications and perhaps even in the future XBOX applications.
AS both companies realized , there is a huge cave of 16-24 kids whom learned JS from some web tutorial , they give them all uniforms and send them to the battle.
Very interesting it is !!!

Client side apps written with Dart can be converted to JavaScript (this is a key design feature of Dart, not just an add-on). When the client side app is running, it can access data from any webserver technology by using XmlHttpRequest (for example, a RESTful web server that responds to GET and POST).
In this respect, it is similar to writing a pure JavaScript client side app, or a Flash app that uses the server to send and retrieve data (think Gmail, Google Plus etc...). Ideally, you'd also store data in the browser so that your app can also work offline.
Using this model, whether the server side itself is written in .net, java, ruby, python or some other is up to the developer.

It will work on the client side but won't work on the server side since it isn't supported by .NET. You will be able to use it on the client side even in browsers which don't support it directly because Google created Dart -> JavaScript compiler.

Related

Python QT on Azure

I'm using Python and QT (PySide) in a local application (which connect to a database on cloud Azure).
Now, my objective is moving this app on the web, in particular on Azure (I have an Azure subscription), simply transfering it on Azure, it's possible in some manner? I have not found examples on the web.
The important question is: is Python QT (app web) compatible with Azure?
Thanks
UPDATED ANSWER!
Yes, now you can. Well sort of. The mad mads at Digia have created something called "QT for Web Assembly" that can compile your whole app into something that runs embedded into a web page.
https://doc.qt.io/qtcreator/creator-setup-webassembly.html
You might have to rethink connecting directly to the database however, as thats simply not gonna fly with web-sockets (And honestly direct app to remote RDBMS has never been a smart move. Theres a LOT of things that can go wrong letting the internet connnect to your databaes). But you could at least keep the UI and rewrite the databaes layer to interogate something like a GraphQL (or whatever) front end to the data.
OLD ANSWER
I'm afraid your up for a nearly complete rewrite. QT is a desktop/mobile platform. It doesn't go anywhere near HTML/CSS except perhaps for displaying them in a webview component. Azure or AWS won't magically make it into a web application for you.
Your code as it stands needd to be rewritten in a web-first transactional manner. That is it takes a request, processes it, produces a result. To some extent websockets has changed this dynamic for a limited subset of use cases where interaction needs to be non transactional, and modern web app design hides much of the transactionality behind a web-services model, but 90% of web work is still very much transactional.
Database <---> Web server/Web app stack <--- Internet! --> Web browser
My suggestion is to pick up Django (or one of the other systems. If its just simple, Flask is another good alternative. Flask for simple apps, Django for the big stuff. Or use something else, you have choices here!, and start from scratch. Analyse your products function and start mapping out how to make this work as a database driven transactional system.
Theres no shortcuts here, I'm afraid.

Architecture for an integrated offline windows + Web + android application with minimal duplicate effort

We are looking to develop an application wherein the requirement is such that we need some help on designing the architecture. I am putting down below the requirements of the application.
Brief Description
1) The application shall work on web + Android + Offline desktop version (Offline version meaning entirely offline environment wherein full functionality shall work without internet)
if possible offline android as well (which as per my research is difficult to do in same backend so caching can be used for temporary offline usage)
2) While designing the architecture we want to minimise the rework such that we shall be able to use the same Database, Logic code and Frontend as much as possible
3) Everytime application is updated then web and android will reflect it immediately due to API integration. And for offline application, we want to update the logic and database everytime it connects to internet.
Challenges I am facing
1) Database choice : Since it has to be an offline solution as well, I understand that we will have to use either SQLite or SQL compact edition so that we can use the free version and installation file is also not very big
2) Logic : Due to offline requirement, we may have to put entire logic in Asp.net / (any other suggestions) since stored procedures are not supported in above mentioned databases
Some links I found regarding this :
https://www.codeproject.com/Questions/346702/How-to-make-work-an-Online-Web-application-Offline
3) Application framework : Which framework MVC / MVVM etc would be suitable to minimise the work for web based and offline app.
4) Frontend : I understand that we will have to make different screens for web and android. However want to know whether we can use HTML 5 (cache feature) or Angular JS which can be used in offline environment as well or do we have to make offline screens seperately?
Build an ASP.Net web app with offline functionality
https://www.html5rocks.com/en/tutorials/appcache/beginner/
5) Can apache cordova be used in someway for better architecture (I dont know much about it hence)
6) I am sure I might be missing something. If you can offer some suggestion on best way to go about developing this application then will really appreciate your help
Your requirements are not very clear to me.
But if i have backend which is catering to multiple clients with different devices.
I will take the following strategy.
I will expose the backend functionality through rest/HTTP and let the clients consume them.
If i want to make the same UI and functionality and want to do it quickly for different mobile platforms. i will go for a Cordova,Phonegap or a Xamarin app. But keep it in mind that they lack some native functionality.
For web i will go with a UI framework which is device screen size responsive like like openUI5 ( i am sure there are dozen others ), such that an user can open the application in a web browser in any device and it gets rendered easily.
For Desktop based apps again i have to develop a separate UI. If you again have multiple flavors in Desktop application like Windows , Mac etc. You can take multiple strategies like Have a common Java layer + Minimal native layers for each OS or having full blown native layers or have the logic exposed as API in a low level language as C++ and then let high level languages consume them.
For all the apps you can use DBs like SQLite . Have the common DB and scripts ready which easily replicate the table structure for you.
Determination of a technology for the backend can be upto you (depending upon your requirements) and should not matter to clients if you expose your functionality in a restful manner.
Hope this helps.
Best Regards,
Saurav

How to sign XML using private key contained in smartcard for a web application?

I was looking for a solution to sign XML using unexportable private key (this require passphrase/secret password to be informed by user input for create the hash using it) contained in usb token (smartcard etc) for a web application. I have made a c# class library to make this but obviously the code is executed in server-side, so I can't access the usbtoken/smartcard of the client over internet, unless it's plugged in the server pc (so my solution may be installed in local network of my customers and the usbtoken plugged in server's usb. It's working like that today but I want to change this for the customer use its token in his machine)
I have created a code using SignedXml, X509Certificates and other classes, to achieve this, but I was looking for equivalents in silverlight class library for encapsulate all this things and execute it in client side, but unfortunately SignedXml can't be used in Silverlight (not exists..).
I have created an ActiveX for doing this successfully but my solution now only works in Internet Explorer/Windows, and it's not very easy to maintain because of my business logics.
Anyone can help me with this please? Any suggestions are very welcome.
If I can port my activex solution to silverlight, or if its possible to do that using other MS Technology that can be executed in other browser/OS.
Sorry for bad English, not a native speaker. Thank you.
Java applet is a better option than the ActiveX.
Silverlight won't give you access to certificate storages, and its development has stopped (Silverlight 5 is officially the last version).
Our company offers a ready to use solution for distributed cryptography which includes ActiveX, Java applet and Flash module for client-side activities. This solution is discussed in details in this answer.

Is it possible to create web application using Qt?

How to create web application using Qt?
This depends on what you mean by "web application". If you mean an application that can show parts of a web page in its interface as rendered HTML, like a browser can...yes. Qt incorporates something called QtWebKit:
http://doc.qt.io/qt-5/qtwebkit-index.html
(Note: Back in the olden days it was Microsoft--I think--who first made an embeddable Internet Explorer control so that you could fetch a URL into the midst of some MFC or VB application and run a browser in the midst of your otherwise-form-based application. The event hooks for Microsoft's solution sucked, Qt's are much better.)
Anyway, this is great if you want people to install your application on their machine, where it fetches web data but takes advantages of native features to be richer than a browser could. But be careful because these days native apps have to be really outstanding to surpass the advantage of something that runs in a browser they already have.
HOWEVER If you are trying to use QtCore to push server-side content out and fulfill web requests, that'll be an uphill battle. You might find some related examples if you look hard enough:
https://web.archive.org/web/20100922075100/http://labs.qt.nokia.com/2006/12/20/whats-this-cgi/
Very few people use C++ (much less Qt) to generate web pages server-side. Yet there are still some doing it, even in pretty cool ways:
http://www.webtoolkit.eu/wt
...regardless, QtCreator will be no help in that kind of pursuit.
The functionality you are asking for does not exist within Qt itself. However, there exists (at least) one third party library that allows some of the Qt code for a desktop app to be re-used to a certain extent for serving up a web app:
http://cutelyst.org/
However, this does not magically allow you to write a QML interface with QML Widgets and have a visual interface accessible via a web browser.
What do you mean by "web application"? Is it a desktop app with web features? If so, yes Qt in general is very good for that.
If you mean a kind of server that outputs HTML, then you should use something else because you would have to reinvent many wheels to make it work.
You'd require to run or embed web server. It would be more whise to turn to a Apache Web Server or Apache Tomcat based approach. Otherwhise you'd run somewhat against the odds.
Consider also using some HTTP server library like libonion or Wt. Wt is close in spirit to Qt. However, you won't use Qt itself. libonion is lower level (and you may want to use browser-side Web frameworks like e.g. JQuery or AngularJS with it).
If you already have some Web server, you could consider developing some FastCGI application in C++.
You surely need a good understanding of HTTP protocol and of HTML5 & AJAX.
Since this is 11 years old, I thought I'd come here to tell you that it does indeed seem possible now that qt supports webassembly. The newest version, 6.4 (newest version as of today jan 31 2023), now offers support for webassembly and their website has various examples of apps built with qt that run in the browser.
https://www.qt.io/qt-examples-for-webassembly

Advantages/Disadvantages of AIR vs Flex/Web

I'm tasked with writing an application for placing and connecting objects (sort of like a room planner where you can place furniture). I've made a demo using Flash Builder 4 and built it for AIR as a desktop app. Now the client wants the full app, but they and I am unsure whether to continue building it as an AIR app or transform it to a web application using Flex. I tried making a simple conversion of the AIR app to a web app, and most things worked but not all. The things that don't work seem to be simple bugs, though, not complete lack of capability.
The capabilities that I'm going to need (except for the modelling) are:
Printing of the finished image + a list of the furniture that has been placed
A way to save and retrieve finished plans
A way to export the list of furniture to Excel format
Handling a whole slew of data about the different objects
Only the printing has been implemented so far, and seems to work in the web app as well.
What advantages/disadvantages are there with the two approaches? Are any of the capabilities I need much worse (or even impossible) to implement in either approach?
Edit: Thanks all for your answers. From them, and my own research, I came up with the following:
Web app
Advantages
Accessible, no need for installing software
Easy to keep up to date
Disadvantages
Requires Flash 10 (for saving files)
Requires a web server to serve content
Sligthly longer development time (from where I am right now)
Requires an internet connection to work
Lots of data transport, may be slow on a slow network
Desktop AIR app
Advantages
Slightly faster development time (from where I am right now)
No web server necessary
Can be used while not connected to the internet
All data is local and faster to load
Disadvantages
Requires the Adobe AIR runtime + a separate installation of the program
Updates need to be distributed to all users and an admin needs to install them
There is no one straight answer for this one. A few points to consider:
If you want to use specific AIR features like offline usage, integration with the user's OS etc, you should use AIR (of course)
Flex applications are more easy to distribute and upgrade, because everyone uses the same swf instance from the server. When using a server backend with AIR, you should be aware of possible backwards compatibility issues when upgrading you application.
There are a lot of little differences, but in broad strokes, the only considerations you have to think about are:
Does it need to be on the Web?
Does it need file system access.
If (1) then use regular Flash. If (2) then use AIR.
The biggest disadvantage is related to the update model - you need to be a super user in order to update the air application - especially in enterprise the users of the AIR applications don't have rights to update it. If your application is running in the browser you do not have this issue.
Besides that, I do not see any disadvantage.
Check out flash 10 FileReference you can let users save results easily to their local file system. I've used it to create PDF's and let the user save that for printing.
For the PDF side I used Alive PDF.
protected function PrintCard(event:MouseEvent):void
{
//ShowHideBorders();
var printPDF:PDF = new PDF( Orientation.LANDSCAPE, Unit.MM, Size.LETTER );
printPDF.setDisplayMode( Display.FULL_WIDTH, Layout.SINGLE_PAGE );
printPDF.addPage();
printPDF.addImage(CardPanel);
var fileRef:FileReference = new FileReference();
fileRef.save(printPDF.save(Method.LOCAL), "card.pdf"); // Sends the file to the USER
//ShowHideBorders();
}

Resources