Changing data service from BlazeDS to PHP - actionscript-3

Recently started to learn Flex technology to create RIAs. And now I want to create web based application of my created program in C++ builder. (flight info sys)
I liked the Flex because of it's cross platform and animation rich possibilities. One of the best web applications that i faced with in the inet is http://examples.adobe.com/flex3/devnet/networkmonitor/main.html
it has wonderful animating grid possibilities. Its server technology is in Java.
How about converting this data service to PHP? That should read data from mysql in PHP..
I prefer working with PHP (as data service) and MySql (as rdbms) in Flex...
seeing animated grid is so cool :)) Switch to Grid mode!
Is it possible to convert it's Data service to php?

Flex is a client side technology that is server-side agnostic. There are a number of ways you can use PHP to get what you want. The preferred approach for maintenance and performance would be using AMFPHP which allows you to define a PHP based destination that behaves like Blaze DS with respect to AMF.

Is there any reason why you would want to combine to system that do exactly the same thing? blazeds uses AMF and flex data service will ask you to download Zend which contain amf for php if you are using php server.
If you are using php as the flex server, connecting to mysql server is very easy, you would probably need blazeds if you are using other database server such as mssql server and so on.
php server is the best way to go in flex using flash builder 4 and above with mysql server.

Related

angular back-end with mysql

Good evening!
I would like to create a web application with Angular 6 but I would like to have Back-end mysql (This is the only basic form I understand a bit) only. Is it possible to have mysql as back-end and without having to use php?
I heard also about mongodb, but can we make requests with conditions for this management system (WHERE, LIKE ... as in sql).
There are two layers in your application - Angular is your front-end presentation layer and an API/Web Service is your back-end data layer which returns JSON data to the front-end. You can use any RDBMS provided your API service supports it. For example, .NET WebAPI supports MySQL through .NET Connector. You can use a variety of API platforms - PHP supports mysql through mysqli and other frameworks.
No, you can not communicate directly between Angular and MySQL. You'll need to build a back-end Web service that calls MySql using php or node. Angular can communicate with this back-end Web service via http.
Here are the steps you need:
1) Learn Angular. Start with the tutorial here: https://angular.io/tutorial
2) Learn how to build a back-end Web service to talk to your mysql backend. You could use php or node.js. See this article for more information. https://www.quora.com/How-do-I-connect-MySQL-to-an-Angular-4-application
3) Learn how to use Angular's http feature to talk to the back-end Web service. (Using the above linked tutorial for help.)
NOTE: You could use firebase instead. It does NOT require that you build a back-end Web service as it provides its own. You can find out more here: https://angularfirebase.com/ or here: https://github.com/angular/angularfire2
If you use Angular in front-end, you can use any backend with it to connect to MySQL database, for example:
Jersey web service written in Java
Php with mysqli
You can also use noSQL database with MongoDB or firebase.
The choice depends on the structure of your database (so you decide if it is better to have relational on noSQL database) and another very important thing is the hosting plan on which you want to deploy your website. If you have a shared server on which you have mySQL and you want to create a relational database, I recommend you to use the following architecture (Angular as front-end, php mysqli as back-end only to select/update from database, and mySQL to store database).

VB.Net Silverlight project and MySQL

I am an experienced web programmer that has sadly had little experience with Web Services and technologies like Silverlight - I've done a lot of PHP, Javascript, CSS and MySQL. I recently have been assigned to learn Silverlight and connect a new app to a MySQL database. After a full week of trying to get this working, I'm really hoping someone can answer these questions:
I have found the MySQL .NET Connector - am I correct that this is not compatible with Silverlight and I do not need it?
I understand I must use a Web Service for this. Can I use WCF or WCF RIA, or am I best using a more traditional web service method like REST or SOAP?
What's the best web service method for many quick queries (such as updating a search as the user types in the keywords)
Do I have to use technology like LINQ, Entity SQL, ADO.NET Framework, or a stored procedure? Is one of these the best way to do it or should I just skip them all and create a simple web service?
What's the best source to learn how to do specifically Silverlight VB.NET and MySQL and learn to do it the best way as explained above. Everything I've found (books and websites) seems to be in C#, not a Silverlight product, or just uses built in SQL Server support. Very frustrating!
For our web app, we need to be able to give the buyer not just access to our client side application via a browser but also the server side so they can OPTIONALLY host the entire product themselves. We're hoping to have one installer for them on their server (so they wouldn't have to set up php or mysql to host the product for example). If I use a VB.NET website and web service, will that deploy as just an exe or dll so the user won't have to install anything special? Is installing mysql on their servers unavoidable? Please advise.
Thank you!
Wow, lots of questions in a single question.
You can't use this from Silverlight.
WCF and WCF RIA are both technologies while SOAP and REST are protocols that are both supported by WCF. So yes.
Quick queries require good code and a well tuned database, the protocol won't be an issue.
LINQ, Entity SQL, and ADO.Net are all database access technologies and have nothing to do with web services. You'll need to build a web service and then connect it to a database using some database access technology. Which one you use depends on what backend you have.
C# is much more common. Most of the MSDN content has VB.Net as well. MySQL isn't an MS technology. You can use MySQL with Entity Framework and then expose that using WCF RIA Services.
If you use VB.Net as the server side technology they will need to be running Windows with IIS and have .NET installed. They will also have to install MySQL if they want to host it.

WCF: Best way to get data from Oracle 10g, MySQL and SQL Server 2008 databases?

I am designing a simple C# WCF service using ASP.NET 4.0 and hosted on IIS7, which will be used by .NET and Java web applications and desktop applications to extract data stored in various databases (both local and remote). I am starting to learn how to use VS2010 and WCF after working for a few years on VS2005 and asp.net web services, so am somewhat of a noob to WCF but know a bit about web services and Visual Studio.
Does anyone have opinions on what the best approach would be in terms of project/class/file setup in Visual Studio 2010 to do this, seeing as how I want to maximize code re-use and minimize development time yet still have the ability to connect to the different databases? I have a WCF Service Application project for the service, and have generated a WCF Client to use for testing using svcutil.exe, but now I'm at the point where I need to start writing database access layer code (or "model" code for MVC if that's the design route I need to go down).
Any help appreciated, thanks!
Each of the databases will have their set of nuisances while integration. The first thing you need to start with would be to design your model in more of OO (Object Oriented) fashion than relation DB way. Once such a model is created, you need to implement mapper layer/classes that would map data from a relational form to a OO format. Then for each DB you need to write some data access code. The amount of code you write for data access may well depend upon the tools\technologies you use. You could look into Entity Framework or NHibernate or other such ORMs to decrease the code required to access data. But keep in mind these ORM mappers may require their own set of tweaks to work well with MySQL, Oracle, SQL Server.

What are the various possibilities to use MySql in a desktop applicaion

Can MySql database be used as a back-end of a desktop application. What are the various possible ways to do it?
I would say that it would be possible, with each desktop application client connecting to a centralized mysql database, at the client site, or possibly connecting to a centralized server managed by you/your company, and like #Neil Butterworth mentioned there are various APIs/methods to use to talk to the database. However, if you are looking to embed a database with your application, I would suggest looking at sqlite instead. It is a small,lightweight relational database designed for being embedded into applications.
To add to nstehr's answer, see:
SQLite vs MySQL
How scalable is Sqlite
How do databases work internally
Yes, I have done so on more than one occasion. Build your database in MySQL, either locally or on a remote machine, and then set up your connection to the database using the appropriate API.
There is a package for connecting to a .NET application (just search .NET MySQL library and it should turn up), with Java you can use Hibernate (or any other ORM Framework) and set the dialect to whichever version of MySQL you're using in the hibernate.config file. Or you could just use ODBC/JDBC directly. I'm sure other languages have their own support.
Any application, if built well, should be able to be supported by a variety of databases, and it should not affect the application. Switching between databases should involve changing a couple of property files at most, and then testing for database-specific idiosyncrasies.
Can MySql database be used as a
back-end of a desktop application
Yes, of course - just like any other database.
What are the various possible ways to
do it?
What do you mean? Do you mean how to access the database from the app? Lots of ways - some are:
via its native C API
via ODBC
via JDBC
Which one you use will of course depend greatly on which language(s) your desktop app is written in.

Accessing mysql from Adobe flex/AIR

Is it possible to directly access MySql databases through an Adobe AIR/Flex
application?
If not, what is the next best alternative?
I'd have to disagree (though respectfully!) with Abdullah that building an ODBC client into AIR would "cause wierd problems and open up security issues" -- that's often how it's done (e.g., Java and .NET, both of whose runtimes package various ODBC clients) -- but both posters are right: the only way's coding some sort of a service interface into your AIR application (using Flex classes like WebService, HTTPService, and so on) and a complementary server-side interface (e.g., REST via PHP, which would then connect up with your MySQL database). For simple apps, it can be a bit of a pain, but for the moment, that's all we gots. :)
Best of luck!
I haven't tried yes but there are some projects to implement a native driver in AS3 to connect to mysql server. In the end it's just a socket connection and AIR applications are allowed to open socket.
Have a look at http://code.google.com/p/assql/
No, although AIR does have a local (client-side) SQLite database builtin. You don't really want your client apps to have direct access to the server-side database anyways, it can really cause weird problems and open security issues up. You can expose a MySQL database with web services however. This article has a really easy way of doing it.
I would not recommend accessing the database directly. I describe how I'd do it here.
IMHO, the best way to access any Database from a Flex APP (Air or Flash) is to create a webservice. After a few tryouts with PHP, i got into WSDL SOAP webservice build in C# and it´s a beauty! From C#, i got the PostgreSQL, MySQL, SQL-SERVER or Oracle anytime. And using Flex Builder, you can import the WSDL so the objects and webmethod created on the WSDL side will be created for you, with events, listenerers and objects. Try. With C# or Java or any other language, the WSDL SOAP is a great alternative.
Actually, in AIR 2.0, Adobe added NativeProcess functionality. This allows the user to exchange data between applications via the command line's stdin/stdout. The drawback is that you must compile your application as an EXE, DMG, or RPM file as this functionality is not cross platform. MySQL works wonderfully via the command line so this could be a very good option for you. Here's some links on using the functionality.
http://blog.omarfouad.com/?p=277
http://gotoandlearn.com/play.php?id=125
http://gotoandlearn.com/play.php?id=126
http://www.adobe.com/devnet/air/flex/articles/air_screenrecording.html