How to integrate Visual FoxPro w/ MySQL for eCommerce website? - mysql

I'm working on an eCommerce website for a small merchant. This merchant uses Opera (which is based on Visual FoxPro) to manage his in-store inventory, and would like the online store inventory to reflect the in-store inventory.
I'm guessing that my first step is to set up a way to regularly transfer the information from the VFP database to a MySQL database on the website's server. Is there an established process for this? Am I even approaching this problem from the right angle? I've heard a lot about ODBC, but am unsure as to how to implement it or if it's what I'm looking for in this situation.
If it wasn't obvious by this point, I'm in over my head here, and would appreciate any and all advice you may have, including links to articles or tutorials that can help improve my general understanding of all the moving parts here.
Thanks much.

Co-worker developed synchronization process between VFP and MSSQL2008. WCF service which took input directly from VFP.
On other project - as far as i remember, when we tried ODBC .NET data adapter, it had problems with encodings and foreign languages. That's why we used COM+, serialization for communication with .NET.
But it seems to me you are using PHP (eCommerce=>Drupal=>PHP) so you are in completely different situation.
In your case, i would start with checking out if Opera (i guess it's this Opera) provides built-in export and eCommerce provides built-in import. Mostly because it might be tedious work to sync data manually from 2 apps coded by someone else. Then i would research if i/o can be joined and automated (something like scheduled task on win environment). Unfortunately, can't help much more because i'm unfamiliar with those tools, products and technologies.
Anyway - it seems to me like quite hard and dirty task and i wish you good luck. :)

Depend on what is that you are using to implement the website.. in general it is pretty easy with ODBC (In Java , I did it using the jdbc-odbc bridge)

Related

Saving SQL Queries in SharePoint

Trying to determine if it is feasible to use SharePoint as a SQL Query development repository...
We do quite a bit of query development in SQL Server 2012 for data analysis/discovery and it would be great to be able to share valuable queries among team members without having to constantly email SQL back and forth. The email flood is just an ugly mess that we need to stop.
Ideally, it would be great to be able to save directly to SharePoint within SQL Server (File > Save > Save to SharePoint) and then allow SharePoint to do version management for the team. I know there are pretty robust tools out there for version management but we are currently just looking for something lightweight at this point and something that can be implemented quickly to test our options out.
Is something like this feasible (saving directly to SharePoint through SQL Server)?
If not feasible (or heck, if it is just a bad idea) what low cost/no cost options are there for sharing code/sql between team members? And better yet, something that we can get up and running very quickly...
Thanks in advance for your input and insight!
Great idea, think I might make one myself.
Say you have
http://my.sharepoint.dom/cool_repos/sql
You should be able to access the same through explorer using
\\my.sharepoint.dom\cool_repos\sql

Custom digital asset management tool - where to start

I work at a production studio that has hundreds of assets (2D images, videos, 3D models, etc) that we use over and over again in our library. Right now it is just a folder on our server, but because I am a particularly adventurous person I am looking to create a database/application that allows users (approximately 20) to search for and "grab" items from our internal network. I would also need a way for them to upload items to the database - every project we work on we're creating new assets for the library and it grows daily.
I'm a very amateur programmer - mostly working in Javascript and HTML, so what I'm looking for is advice anyone can give me on where to start. From the research I've done I imagine that I would build a MySQL database to store all of the information, and then create an HTML site that all of the users can access via their web browser as the GUI. I know a little bit of Python and really like it so I'm thinking I'll use Python as the back-end and to run MySQL.
I'd love to hear any advice the community can give me! I plan to do this on zero budget, so open-source all the way. The closest tool I can think of to what I want is Adobe Bridge - which I love but which isn't quite what I'm looking for and doesn't have robust enough searching and tagging (and doesn't support anything but images and video).
As a database MySQL isn't particularly suited to this task. The challenge you'll run into is that users will want to access the files in a folder like structure, but for performance reasons you probably will not want a parent-child schema (at least not using InnoDB - I can't speak to the other storage engines). It is certainly possible to create a performant pc schema on InnoDB, but it is not a challenge to be undertaken casually.
If you have access to MSSQL 2012 it makes a tremendous effort at solving this exact problem http://technet.microsoft.com/en-us/library/ff929144.aspx
I love recommending MySQL, but in this case I'd recommend a different database choice.

Desktop programming language to connect to remote MySQL

A customer of mine asked me a better and faster solution to update it's real estate web site as he and his employees don't want to connect to the web site and update one by one the ads as they don't want to loose time waiting the normal latency of the internet.
I firstly solved the issue by building a PHP script that imported an Excel file into the web site's MySQL database and it worked greatly. But the problem were pictures that have still to be uploaded separately. I then wrote a PHP script that uploaded the pictures using ajax and drag&drop so the user could select multiple pictures and upload them at once. And this worked too, but the customer is still not completely satisfied as he says this solution is quite 'patched'.
I then thought about a desktop application - a kind of local database (could be SQLite) - that the user keeps updated locally and only at the end of the day the app connects to the remote server and updates the db and uploads the pictures.
My question is: what EASY desktop high level programming language I could use to do the job? Do you know any RAD (visual IDE) programming language able to connect to a remote mySQL server and upload data via a simple custom GUI?
I tried RealBasic and PureBasic but I did not work it out. I thought about building the app in PHP and then convert it to EXE but I did not tried yet.
Please don't suggest me Java, C or Delphy as I'm looking for something very easy.
Thank you
Have you considered a client side javascript/html app that syncs with the server, since you're already familiar with the platform? If one browser better supports what you want to do (Firefox has some extension perhaps vs Chrome, or whatever), than mandate that to run this app (rather than worrying about being portable across browsers).
All of the browsers can have client side storage now, and you can just do things locally, and finally push them to the server "all at once".
If your client is using a Windows platform, you could use IronPython (.NET), VB.NET, or C#. These all allow you to create windows/forms visually in Visual Studio. If you're not already familiar with the .NET platform I'm not sure how 'easy' this will be, but I think that's going to be true for most other platforms as well.
That being said, it sounds like your existing solution is probably the best idea - perhaps if you can make your solution feel less like a "patch" they will be satisfied.
No reason you can't use Purebasic if that's what you're comfortable with. There are HTTP file upload examples on the PB forums.
I've used Purebasic for years but I'd recommend spending the time to get to know C#/.NET - it's a world of difference and once you learn it stuff like this is pretty easy.

Best way to update products

Some background:
We provide a complex system consisting of a large database and several programs - most written in C#, however some legacy applications are still running on MFC.
Most of the stuff we provide runs on a single server (runs SQL server and SQL Management studio 2005), however several applications can run on a number of client's computers. Updating this is a real pain, since after we update the database the outdated software is likely to break due to database changes. Updating the server software manually is one thing, however making sure all the client software works too is practically impossible, and will only get worse with time.
I am to write an updating service, which will be able to update the whole product - update the database, reinstall services and applications. (However only the programs / files /tables / etc that are actually modified should be updated. Downloading the whole product each time there is a update available is not an option. Also, some computers may only have a subset of avaliable programs installed)
First of all is there a already a good way of doing this? If there is something similar to ClickOnce that would also be able to update databases already out there I'd much rather use that.
If not, what are the best practices when it comes to updating? All and any material will be greatly appreciated.
I will need some updates to be installed on the server ASAP after the updates have been submitted, without any user input. That includes a windows service (that is running at all times) and any database changes. After these changes have been made, I will have to prevent any software that is not up to date from either accessing the parts that have been changed, or from running at all.
Any advice will be greatly appreciated - If I do have to write a system like that, I'd like to do it right.
Best practice would be to package the app up in an MSI and use Group Policy to push the updates out to each client.
If that's not possible then you need some way of informing the client app that it is out-of-date (simple check against a server holding the current version number would probably suffice) and refuse to work until an update patch is downloaded and installed - you could even launch this process from inside the app itself.
This answer may help you, I haven't personally used Wix but this seems to be along the lines of what you're looking for. Make sure to check out Lesson 4 in the linked tutorial, as this provides the details you would require.
I'm not sure where you would find best practices when it comes to updating, but in my personal opinion you shouldn't ever force a user to update unless it breaks the underlying application (like yours does). I would be very interested to hear if someone has a link to a list of best practices on this topic.
Edit
I was interested in possible best practices for updating so I started another question thread here. The general consensus in the answers is "Ask the user/client", but there may be some other details in the answers which may help you, I'm afraid I can't find any actual hard rules on the subject anywhere (which I was expecting).

Porting MS Access application

I have been asked by a friend to help him assess a number of quotes for porting a desktop application based on MS access and VBA to a web based app. The application seems to have a relatively large amount of business logic coded into the VBA.
My question is very specific - are there any good tools or resources out there which could assist the porting from access, rather than doing a complete re-write?
The end technology used for the web app does not matter hugely, but would ideally be as mainstream as possible.
You may explore the possibilities offered by Sharepoint. It may help you get the data accessible online but how well will that work depends also on how much VBA code was used in the Access application.
There are some tools around that pretend they can convert MS Access to PHP/ASP websites like DB Forms, but I haven't tried them and they usually only convert the visible part of the app and not the queries and VBA.
They can be helpful to get started though.
Random thoughts
The VBA tends to be the biggest issue.
Moving to ASP.Net will take time and for that you are faced with difficult choices:
transfer all code to the ASP.NET to just get it working
rethink the structure and do a proper ASP.Net implementation from scratch.
I'd prefer the first one: just try has hard as possible to get results fast.
Use SSMA to move the data to SQL Server (unless you want to keep Access as the backend).
Make the forms look the same as on your existing application (or at least have the same function), port the VBA to VB.Net (or C# if you feel like it) form by form, module by module and test that they work as you go along.
Don't try to refactor or make things better at this stage, the point is to 'slap' the old code on the new 'system' and make it bark as it used to, not better, not worse.
Only then can you start refactoring and improving using the new tools at your disposal.
I'm saying all this assuming that there was nothing terribly wrong with the old app and that it just needed to be ported for online consumption.
If the old app was defective and wasn't fulfilling its role, then more emphasis should be placed on re-thinking which parts should be translated and which one should be reworked.
At any rate, you need to have a detailed action plan and a review of the current code and functionalities and try to limit as much as possible your expectations for the first version of the new system: avoid letting everyone input their wishes or your project will become horrendously difficult.
Concentrate on the minimum needed to achieve a certain level of functionality that will satisfy your users, then build on that.
There may be some tools to some of the basic stuff, like to upsize to a different database or maybe the look and text boxes of the forms, but converting what sounds like a lot of VBA code, not so sure.
Is this an intranet/local network type of web app or are you putting it out on the internet? Security will become a major difference between this and your Access app.
Make sure they understand Access/VBA so you can maintain the business logic that has been over the life of the Access app.
Convince your friend to stop/slow any development on the Access app to prevent the company from aiming at a moving target. This may not be realistic, but really needs to be considered.
Is there a reason why hosting the app on Windows Terminal Server would not suffice? This means zero changes to the app, no reprogramming cost and no danger of losing crucial business logic. If you use the Citrix extensions, you can run it in a web browser (though I guess that only works with IE -- I've never used them). But the RDP client comes in versions for Mac and Linux as well as Windows, so you can basically support anybody as long as they install the RDP client for their OS.
Yes, it's more installation on the client end, but it's a helluva lot cheaper and easier on the development and avoids the problem of losing important things coded into the Access app.
Of course, supporting large user populations on WTS/Citrix can get expensive and if the Access app is in need of re-engineering, anyway, it can change the balance. But it's something that you should consider. It's really easy to set up WTS, in fact, and provisioning a server for it basically a matter of adding RAM and Internet bandwidth (though RDP is really efficient to begin with).
One key mistake many people make when trying to run an Access app on WTS:
YOU MUST SPLIT THE DATABASE (front with forms/reports/etc., back end with data tables only), and each user must have their own copy of the front end (stored in user profile on the WTS, or in a folder on your WTS server's data partition with appropriate permissions assigned to the user groups authorized to use the app). Tony Toews's front-end updater is very useful in this context, and explicitly engineered to work in a Terminal Server environment.