I have no experience in Ruby on Rails. I employed a developer to create a tour booking system for my site (php codeigniter). He developed it using Ruby on Rails in heroku and then linked to it by iframe in my front end.
Problem is
MS explorer doesnt display it,
issues with dynamic booking form sizing,
Cookies for the cart doesnt work as it's cross site and in iOS sometimes the security denies the cookies so system doesnt work,
Site massively slowed down due to the http requests.
Is there a way to convert the ruby system into php so i can just have it on my local site? Can anyone think of any other solution if not??
thanks
Unfortunately, there is not easy way to convert a language to another, with some exception (like language that compiles to another one, for example CoffeeScript to JavaScript). Using iframes will create security problems, which in turn trigger (modern) browser to block them.
So, what are your options?
Use the Ruby & Rails website as a subdomain of your main. Example, if your site runs on chambers.com and that the Ruby on Rails site is about invoicing, it could be on invoncing.chambers.com, and you could use links from one to the other
Rewrite either the Ruby or the PHP part, depending on size & team capability
Related
I'm attempting to build an application to aid engineers and designers in laying out o-ring grooves for sealing applications, a bit like this one.
I'd like to host it on my own website. The website is built on Joomla, and I'm trying to figure out the best way to integrate it. Ideally, the app shouldn't require Java or JS/ActiveX (as these are often blocked by modern browsers), but I'd also prefer to stay away from requiring a form submission to complete the calculations. I'm well versed in Python but have no experience with Django, and wonder if it might fit the bill for these requirements.
Right now the fallback solution is just to go with PHP and form submissions. If there is a way to get around that with Django or any other framework, I'd love to know about it.
python is not really capable of anything different than php. its just better organised. i think the solution to your wish of not having to use forms would be a heavy dose of javascript, html5 and ajax. also you need to think about how you want to include it in your joomla site. joomla is php, joomla components are written using php however it is possible to incorporate pretty much any web app with an iframe. but it tends to be ugly. so i'd recommend php over python in this case.
I am developing a web application using Django and python. We have also a public website where a customer can find information regarding our products. I was thinking to implement this website using WordPress or other well known php CMS, since the content may be modified by people who don't know how to code.
A user must login to access our web application. The login should be located in the public website (built using php and a CMS) along with the registration form. The user model is already implemented in the web application and therefore is not available in the CMS/php. I was thinking to include a login page written in python by means of an iframe. is it a good idea?
Is there a neat solution for this problem? Is a good idea to mix up php/cms and python/Django?
There is an opensource CMS for Django called Mezzanine. Its very elegant.
In some ways, Mezzanine resembles tools such as Wordpress that provide an intuitive interface for managing pages, blog posts, form data, store products, and other types of content. But Mezzanine is also different. Unlike many other platforms that make extensive use of modules or reusable applications, Mezzanine provides most of its functionality by default. This approach yields a more integrated and efficient platform
Follow this link to download and have a look at its features
Regarding you question Is a good idea to mix up php/cms and python/Django?, No, because Django is Python based and wordrepss is PHP based. Although you can sync data by writing different scripts that require some knowledge of both ends.
There is another option https://www.django-cms.org/
This is specially usefull if you have already a django project, because you can add to the project the CMS components, Mezzanine is a very good option too, but you have to start the project from scratch.
I'm working on some kind of a huge project using PHP which is a CRM and Smart Ticketing and Processing System for travel agencies and I'm planning to make it only available on chrome.
And I'm new to Chrome Extensions/Apps, But when i'm reading about creating extensions i surprised that i can create any html content with any JS codes included.
My questions are:
Can I include my application GUI with pure HTML && CSS && JavaScript in some extension and make it send/receive requests to my PHP-API Which already exist in my code since it's fully AJAX project?
And if this can be done; what do i have to create Google-Chrome-App or Google-Chrome-Extension And what is the difference between them and where to start reading about required solutions.
IF this can be done it will be perfect since the GUI elements (HTML, JS, CSS, Images, etc..) will be loaded from local store of each user/employee's machine and the only transferred data would be JSON requests.
Yes, you can create your GUI in pure HTML, CSS and JavaScript. This is actually the only way to make a GUI in Chrome extensions. Your PHP based API can certainly be accessed via an extension, if designed as a fairly typical client side accessible API.
Here's a brief description of Extensions and Packaged Apps:
Extensions are generally designed for augmenting the browser experience. For example, analyzing the pages the user is browsing and highlighting text. Chrome exposes several awesome APIs related to the browser and the browsing experience. However, it's just JavaScript, CSS and HTML, so it's definitely possible to take it a step further and create pretty much fully functional applications. However, there are no UI specific features in the Extension API that would make it easier to create a complex web app. This is not the purpose of Extensions. Look at the extension in the Chrome Web store to see some examples. Development documentation can be found here.
Chrome Packaged Apps allows you to develop a full blown desktop application using HTML, CSS and JavaScript. You can create complex applications with typical web technologies. This is a fairly new technology, but there's a lot of potential.
There is also the slightly confusing concept of a "Chrome App", which is really just a way to package a typical web application (or site) for display in the Chrome Web Store. This is not not really a development technology.
Keep in mind that Chrome Extensions and Packaged Apps are not drop-in UI frameworks for creating web apps. They are specific technologies for augmenting the browser experience and creating desktop-like apps, respectively.
For example, if you are creating Amazon.com you would not create the main website as an Extension or Packaged App. You would probably develop it using a typical web development stack and release it as a typical web site. Then, you might create a Chrome Extension that pops a window down in your Chrome browser and shows your recent orders, or that finds products on the Amazon store as you browse the internet, but you would probably not create the entire site as an extension.
With Packaged Apps you might create a desktop application that interacts with Amazon but this is really just a desktop application.
Yes of course this is possible but what you are making is a web application A chrome extension is literally a extension of chrome(which has to be installed) written in C or C++ (Just using javascript, html and css is possible). The handy thing about a web application is that it can be used (In every browser) without having to instal any extra components.
To be specific google has extensions and apps. With a specific chrome app you can do more than a regular web page. At first people would have to install the app and agree with the terms of use. this done you have more options in javascript which are normally forbidden for a casual webpage.
A extension is meant to add or change functionalities in chrome like adding your own video player extension to play avi or something like that. Not for building a web application.
If I where you just make a regular web application or create a chrome specific Packaged App.
In your case you are creating a private web application. If it is going to be used inside a lan you can just create a intranet and run your webapp there. If it has to be used global over the internet that you should just secure it with a login.
Or build a desktop application.
During the past two years I have built an App Engine application in Python. Soon it will be possible to use PHP on App Engine. I would like to use off-the-shelf PHP applications such as Wordpress, Mediawiki and phpBB together with my Python application. To the user it should be transparent which of the two applications (Python or PHP) she is using for a particular page. I consider the Python application to be the main application where I will do most of the programming. This is because I have more experience with Python and also because I already have written a lot of reusable code for App Engine.
Currently my approach is to build a proxy in Python that maps HTTP requests like this:
http://www.yellow.com/blog/* to http://phpapp.appspot.com/wordpress/client1/*
http://www.yellow.com/community/* to http://phpapp.appspot.com/phpbb/client1/*
yellow.com is a domain mapped to my Python application.
http://www.blue.com/wiki/* to http://phpapp.appspot.com/mediawiki/client2/*
http://www.blue.com/* to http://phpapp.appspot.com/wordpress/client2/*
blue.com is a domain mapped to my Python application.
Besides the blog, community or wiki, there are a lot of URL's that don't require PHP. These URL's are handled by the Python application. For example: http://www.yellow.com/admin/*.
I'm still struggling with the proxy to get the passing of cookies between the two applications right, but I think it's possible to do this.
It would be awesome if I could get it to work this way. However, it seems to me this is not the most elegant way to handle this. I know I could use subdomains to serve the PHP applications, but I would rather just use URL patterns. Also, with the proxy approach, I can tweak the returned HTML by the PHP application before serving it to the user. Another advantage of this approach is the ability to cache the pages from the PHP applications in memcache.
I would like to hear what you think of my approach to use Google App Engine (custom) Python and (off-the-shelf) PHP applications together. Will I run into problems with the proxy (Javascript, cookies, ...)? Would it be better to build everything in Wordpress, for example, with custom plugins written in PHP (the plugins could fetch data from the Python application)? Other suggestions?
Your use case is a good example of what Appengine's Modules are intended for. Take also a look at the dispatch mechanism.
I work for a small tech start-up, and our main site is built on the CMS Drupal, which is a PHP-based CMS. However, I know some Python and would like to develop web applications to integrate with the website and allow users to interact with them.
How would I go about doing this? Does anyone have any experience or knowledge? Any particular module/script/etc that allows using Python or calling Python from PHP or Drupal?
If you are developing a web application nothing stops you from using Python and making it accessible from a subdomain or path not used by drupal, just have the web server point to it. Ex:
http://mainsite.com/ <- drupal
http://app.mainsite.com <- python web app
http://mainsite.com/python/ <- python web app
This is fairly straight-forward with most web servers. Django might be particularly well suited for this, it has a nice feature which can inspect live databases, and generate models for you:
python manage.py inspect.db > models.py
Which lets you interact with your existing database from Python with a nice ORM.
If you need to literally call Python from a PHP page, you can use zeromq for fast IPC or TCP communication, or build a simple REST API, etc.
There are several different ways to do integrate Drupal with external applications, but your best bet is probably installing the services module in Drupal, and make calls from your Python app over HTTP, just as you would interact with a remote server.
Some other options:
Interact directly with Drupal's database, rather risky as Drupal's database structure can change significantly with module upgrades or even configuration changes.
Place the Python app within an iframe of a Drupal page, giving you Drupal's design, though no functional integration.
Use JavaScript as a client-side middle-man between Drupal and Python.
Use command line as a server-side middle-man between Drupal and Python. Drush would be useful here.