Building an application within a Joomla website? - php

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.

Related

How can I mix in some functionality written in Ruby into a WordPress site?

Here's the thing. I love Ruby and I've been using it for the past couple of years. I love everything about the language and the community.
But I have this soon-to-be-large WordPress site, where I have to implement a lot of additional functinality. The problem is, I really hate customizing WordPress beyond simple theme design.
Examples of things I need to do:
add some additional information to profiles, like karma/points/reputation system
offer users to create their own page after they're allowed to do it
pulling data from some external API and displaying it on the user's profile
I got really used to the whole agile BDD workflow, where I go from Cucumber features to RSpec to implementing the stuff, and the whole WordPress architecture looks to me like ok I'm just gonna have to pray this works.
I'm not sure if it's even wise to try to write some part of the app in Ruby and try to make it work together with WordPress, or if I should just take WordPress as the only thing I've got and make the most of it's strenghts and weaknesses.
The main issue for me is that everything I'm going to write in PHP will take about 5 times as long than if I do it in Ruby, and it will probably also be more secure and robust, since I don't have as much experience with complex PHP stuff. I mean I've done a lot of PHP in the past, but I always felt like the whole thing is going to fall apart at one point.
I know there is probably no definite answer on how to approach this, but any suggestions are welcome.
We've integrated a Rails app into a TYPO3 installation. It worked out pretty well. The key point is to use Rails' support for adapting models to tables of a legacy app. An important point is to handle authentication which we handle by passing the TYPO3 session key to the Rails app in a hidden way (using PHP as the web-client and passing appropriate headers) and looking it up in the session table (respecting the session timeouts). The Rails app itself is mapped into a sub directory using passenger. Performance is very good, it's even amazing compared to our previous implementation trying to use Extbase.
So, in conclusion: If you do it right and the interfaces between the two apps are well planned such an approach can offer great benefits and the best of two worlds. If not done right or you don't understand some implications of Wordpress (like security) you will create a big mess prone to security breaches.
BTW: We reached feature parity with the Extbase (MVC framework in TYPO3) solution after 4 days of using Rails. The Extbase solution took 6 weeeks and caused a lot of headache and trouble. So your time factor may be even better than 5:1.
Why not learn how to to Behavior Driven Development in PHP for WordPress? In fact, this is one of the great opportunities for developers in 2017. We now how full blown BDD frameworks in WP-Codeception, so that you can even automate Gherkin feature files, just like in Cucumber. Check out WordPress-BDD.com for some usefull info.

Is there an argument against using a CMS?

I'm thinking about rebuilding my website from scratch, but this time, using a CMS. Everywhere I turn people tell me to use a cms, but it's only now I'm really considering it. My site isn't too complicated. Is this a good idea in terms of workflow? I'm the only person who will edit the site, so if it's just a matter of workflow and efficiency, should I just convert now before it gets really big?
Sure, a few come to mind.
Deployment complexity. Many CMSes require a database, which means running a database process somewhere, and backing that up, as well as the rest of the code and assets for the site.
More space will be required to hold the CMS code for the manager, framework, libraries, etc.
Bloat could come into play, the CMS may, and likely would, implement features you have no use for.
Additionally any CMS will have some kind of limitations, some things will be more tricky to do than others when compared to a mostly static site.
Just read the code. That's often all the arguments you need. (If your needs are really simple and you don't need plugins and you don't need to write any code yourself I'd still use a CMS, though)
If your site is mainly a design showcase, and doesn't have real content in it, then a CMS will only get in your way and make things harder.
Otherwise, it will mostly be of help.
Along with everyone else's statements. If it's just a small site you don't necessarily need a CMS, but if you are wanting to use a CMS for client projects in the future, why not start now.
Deployment. If you're doing some big changes to your site or testing something, you'll probably want to try it out locally with a development copy of the database. Once you're done, how do you get everything to the live site without overwriting, say, comments that were made on the live site since you created a development copy?
Specialization. CMS's are great for some things, but they're bad at others. What if you want to add more complex functionality to your site? It might be a plugin or module at first, but soon you're writing all this code and you realize you should have just used a framework and built the CMS part yourself.
If it's a simple static site with a single editor and without any aspirations of using complicated functionality and you feel confident enough in your web language of choice, then go for it. Even if you don't feel confident enough, it should be a good challenge.
Write some minor templating so that you can separate your code from your design, have some simple way of adding articles or blog posts or whatever - it could be as simple as including text files from a directory.
Using a CMS, even in their modern and quite usable state will require more resources, hardware-wise. and will probably have a steep learning curve. It will also require maintenance and dilligent security patch application as new vulnerabilities appear. On the other hand a CMS can get you up and running with a basic site quickly, and grow with your needs if you feel like enriching it, as you get to use its large variety of ready made plugins and extensions. You want blog comments with users logging in via OAuth? No problem. RSS? There's an extension for that.
Bottom line is, if this is a simple static site with a single editor as you describe it, it should be trivial to set up some code to run it. You'll spend as much time on its template design as you would on customizing a CMS's template, avoid the initial learning curve a CMS requires, and not worry too much about the resources and maintenance a modern CMS requires. You will, however, be limited in functionality and future ideas by what you can write or integrate yourself.
It depends somewhat on the purpose of the site.
If it is a means to an end of getting information posted on the web, then adopting something like WordPress will quickly get you going, and provide lots of extra functionality that would take a fair amount of time to build in - e.g. stats, feeds, remote publishing etc. There are a few basic steps you'll need to go through setting up self-hosting on a shared web-hosting package e.g. creating the DB and unzipping the files etc but fairly straightforward really. And the time you save administering your website can be focussed on other things where you're making a difference or doing something different to everyone else.
However if your purpose is in part the learning experience of developing the functionality or you have unusual requirements that aren't in a standard CMS, then there is an argument for developing your own.

Coding PHP like asp.net - Is it possible?

While I know PHP extremely well, I was wondering if there is any frameworks / GUI's out there that allow you to develop PHP in the manor that you can develop ASP.net sites? Most important features would be the separation of behind the scene's coding from the actual web view itself. This means each page has it's own class generated behind the scenes and can auto detect when certain buttons are clicked. It would be ideal for all this to be handled by the framework so I don't have to do it all.
Things like textbox1.text would be amazing, but I have no expectations of that. Getting from the $_POST is ok.
Other key features I'd like is the ability to create classes with namespaces and #regions so i can easily access / see only what I want at a specific time. A Data Access Layer object like .net would also be amazing so my SQL could stay clear and in an object form.
Again I am being very optimistic in asking if anyone knows of a setup like this, but figure it's worth asking as I have to develop a rather large PHP project and development time decreases 10 fold due to the usability of even Netbeans compared to ASP.net / Visual Studio.
I appreciate any input
The closest PHP framework I have seen is Prado.
PRADO is a component-based and event-driven framework for rapid Web programming in PHP 5. PRADO reconceptualizes Web application development in terms of components, events and properties instead of procedures, URLs and query parameters.
I haven't looked at it in years though and the old site says they have a new framework, but I'm not sure if it uses the same style.
What you're looking for is a PHP framework with an MVC architecture. There are a lot of those out there, so take your pick. It won't work exactly like .NET since it's a different technology, but you should definitely use a properly structured framework for any serious project.

Django or Drupal, which one should I use that suits best my needs?

I want to learn and use Drupal or Django for the following:
dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security
I like MVC, ORM and object-oriented prg.
Which is better to jump into ? Which one is more mature, powerful, understandable, object-oriented and easier to use by the time ?
What about Python Spring ...
Also, which of these 3 are better documented, are better for a cv and have more extensions?
Known languages: php, java, mysql
Thank you !
I've built several sites on Drupal and Django, my conclusion is: if you need to create something similar to the standard drupal (or Ubercart) feature-set, you don't have much time for development, and you don't expect hight load pressure on a site - you should pick Drupal.
But if you do need to create something more or less custom (no drupal modules already available) you should go with Django - it is quicker and more pleasurable to implement custom complex features using Django. For example if my goal is to implement a second stackoverflow, I'll prefer Django because it will be extremely complicated to implement this badge-based rating system with Drupal.
P.S.
Studying Python (and Django) is an investment in your future, I think. You'll never be able to implement something similar to DropBox using drupal and php, although it could be implemented with java - but java is not so good from development speed perspective.
I'm primarily a (happy) Drupal developer these days, but a friend whose dev skills surpass mine has switched happily from Drupal to Django. Here's his set of reasons.
Drupal and Django doesn't make for a good comparison, as they are quite different.
If all you need is a simple website with a CMS and Paypal, I would go for Drupal. Drupal's strength compared Django is it's many modules (modular system), which most of the time can get you where you want. Drupal is also extremely flexible, and you can change almost anything from within your own code, and there is a huge demand for Drupal developers. You can also let site builders create content, display content and much from from within the AI.
Django on the other hand, is more simple and structured. It's based a lot more on code, making it fast and easy to develop something, but hard for non coders to change certain things. For sites that require a lot of custom coding, I usually prefer working with Django. Python is also a more structured programming language than PHP (IMO), and it's easier to make more maintainable code.
Jump into what you like or what attracts you most after getting a little overview of the capabilities and constraints. I never worked with drupal, but I can recommend django.
Consider your deployment. Pretty much every host will support Drupal. If you go with Django, you will need to select a host that supports fast_cgi or wsgi
You already know php, so just for that you might want to stick with Drupal. However, I prefer Django over Drupal for many reasons.
http://www.reddit.com/r/django/comments/bhvhz/the_onion_uses_django_and_why_it_matters_to_us/ provides some excellent background.
Basically if want things done properly with lots of flexibility, go with Django. If you're very familiar with php, don't feel like learning python, and your site requirements are basic, go with Drupal.
Something to keep in mind is that Django is a bona fide web framework, whereas Drupal is more of a web platform. That is, sometimes you have to hack Drupal to get what you want or that it doesn't fit all situations.
I had never heard of Spring Python but based on the fact that their own site is powered by Drupal, I wouldn't recommend it. Especially if you know Java already, why not consider the original Spring platform?
I've been developing with Django for more than 2 years and have built a couple of Drupal sites in the meantime (per client's specific request to use Drupal). My conclusions are the following:
Even for a smaller site I would have done it quicker building it from scratch with django (or maybe even PHP) for a simple reason, writing code for me is faster than hunting through drupal's unorganized mess of menus and options, or hunting on the web for a module that implements hack X to enable feature Y.
Migrating a site from development to production with Drupal is a big PITA. You can forget about using a VCS tool. All your work is in in the MySQL dump (including configurations, programming logic, views etc.), a few hacked up modules and the uploaded files.

Software for quickest establishment of an online presence

So, every so often you get sites like http://www.twitmaps.com - sites created quickly and pushed online for a random purpose.
Often either you have plenty of spare time, or you just don't have the opportunity to get your own ideas online. For example in this one, the snow images are very vague and could do with more accuracy.
What tools / languages do people use to make a site as quickly and efficiently as possible? Not one with a shop or anything like that - just 1-5 simple php pages, some API linkins to other sites, and a mysql backend. Wordpress is great for blogs, but what about general purpose websites?
I've written sites in ASP, php and am happy playing around with databases and the like - I just want a way to quickly shove something online :)
You have a few choices.
Established blog/CMS software like Wordpress/Joomla/Drupal. You can do almost everything with plugins.
If you need something more flexible use one of frameworks like ROR, Django, CodeIgniter, Zend etc
Use code generator tool like PHPRunner.
Really depends on what you familiar with.
You will find frameworks like drupal and Joomla of great service for this.
http://cakephp.org/
Best web framework I have ever used
CakePHP is good for a PHP-based framework. Since you have PHP experience, this is probably a good place to start. It's designed for rapid website development using a database for storing information.
If you're willing to experiment with new things, give Ruby on Rails a go. CakePHP was initially modelled after Rails, and it's even easier to use when creating simple websites.
For smaller sites that don't really require a database, I would wholeheartedly recommend Sinatra. It is Ruby-based, just like Rails. With Passenger (also known as mod_rails), deploying Rails or Sinatra websites become as easy as uploading files with FTP.
Since you are asking for the quickest way, I'll have to say absolutely, definitely Wordpress or Dokuwiki. They both come with a very quick installer. Wordpress is richer in Plugins, has more good looking templates and requires even less time to get familiar with than Dokuwiki. Dokuwiki doesn't need a database, Wordpress does.
Whenever I need to set up something really quick, without touching a line of code, I go for one of these.

Categories