I am wondering by what the old XML RPC API will be replaced ? We developed a quite complete native(iOS+Android) and HTML5 implementation for the front-end and we'd like to offer that as SDK and REST API.
Right now we are trying to avoid any additional PHP plugin/extension for Joomla and we are currently very interested how we can automate else the data flow for customers. Currently we already support SQL direct access, complete Akeeba backups, or a local/remote Jave-App which feeds the apps from SQL directly, as cron job for instance. At the end and it should go all into our JSON format.
Is there any other project which provides a sort a formal or specified access to Joomla content and functions beyond the internal PHP Joomla API ? We just don't know what will be the replacement(it was too basic anyway). The Joomla website and the docs doesn't help at all to figure such things out.
I hope this question is legitim here. Any suggestion is welcome. thanks,
g.
Related
I want to make a Firefox extension that can store and retrieve data from a database. However I've only been finding solutions that would work locally for each user. I'd like every user to have access to the same database.
Is that possible?
It is possible to access remote SQL databases like MySQL and PostgreSQL with node.js modules, but it is more sensible to create REST API front ends to your databases and call them from the extension. Exposing the SQL calls directly in your web extension is not a good idea. It is basically bad security practice and will expose your database to hackers.
You will also need your addon to pass Mozilla's approval process if you are going to distribute publicly and I doubt the reviewers will be pleased to see raw SQL calls in your extension's code.
The more sensible way is to update the database is through a REST API front end.
A simple example on how to create a REST API for a Postgres database can be found at Node.js, Express.js, and PostgreSQL: CRUD REST API example - LogRocket Blog and this playlist show how to create a REST interface in a Firefox extension - Build a Firefox Extension from Scratch that integrates with Node.js - DEV Community
The above database example is quite simple. For real world use you will need a more advanced REST framework for your API which sanitizes the data before inserting it into the databasse. You have more reading to do here.
However if you need to make SQL calls directly from your extension which I still don't advise, you can include some packages from node.js in your web extension, and use browserify which extracts and packages the modules needed into your extension. Your addons though had better be for private or in-house use, not for public distribution.
Some nodejs modules for database access are - https://github.com/mysqljs/mysql, https://node-postgres.com/ and https://www.npmjs.com/package/pg.
Just a little advice. Feel free to ignore it if you have nothing to do with it. Your question sounds quiet generic. You should learn and doing it by yourself first and only ask here when there are specific issues you're stuck with.
By "locally", I think you mean via Web SQL or IndexedDB. They're called local database and their behaviors are totally different from what you're looking for.
I should haven't need to tell you to do this. Just in case. Of course first thing first you need to know how website is working for both front end and back end, not just local stuff, especially how they're communicating between each other. So you should know about HTTP request, Javascript, and AJAX.
What has it to do with Firefox extension?. Not just Firefox, browser extension is just another type of web page that overlaying the opened web page in all kind of browser. In Firefox the opened page is called activeTabs. The only difference from regular web page is you need to signup your account first, manifest.json file as your project root file, and it compile from command line with web-ext tools. In case if you're facing Cross-origin resource sharing (CORS) restriction, follow instructions HERE and allow the URL on server side.
I'm trying to integrate backend code into a Wix site. Im not too picky about how I want to do this, or what language to write in (ideally, I have a locally-hosted Java code that I'd love to simply call). I wouldn't mind re-writing it in JavaScript though, or another language. But before I decide that I'm confused about my options. I can code but I'm new to the concepts like modules, APIs, & servers.
According to my research, back-end code with Wix is supposed to be easy (or at least do-able and not THAT complicated)....
From this webpage https://support.wix.com/en/article/corvid-calling-server-side-code-from-the-front-end-with-web-modules,
"Web modules are exclusive to Corvid and enable you to write functions that run server-side in the backend, and easily call them in your client-side code. With web modules you can import functions from backend into files or scripts in public, knowing they will run server-side. Corvid handles all the client-server communication required to enable this access."
And from this: https://www.sitepoint.com/what-is-wix-code/
"It’s serverless: All this added functionality comes in a serverless environment that lets you get your work done without any of the normal full-stack development headaches.
Just code and go: Wix Code has a built-in, online IDE and backend so you can just add the code you need to your page or your site, publish, and you’re live."
So, I thought they have a backend IDE where I can write backend code directly, or I could call my Java program. But, as I tried doing this and finding tutorials, it seems I can really only do this by calling a public API from the backend...?
https://youtu.be/tuu0D1izrUU
But ive also read (and someone who supposedly has done it before told me this) that Wix integrates with node.js, which is a backend version of JavaScript.
Can I use a Wix domain for a NodeJS app?
But, when I go into my Wix site I cannot find any option for using Node JS, and doing research on that gives me no useful results.
So, I'm thoroughly confused on what the capabilities are here. Can someone help me make sense of this?
Why are there no tutorials showing explicit code in the Corvid backend module? What's stopping me from simply writing my Java program there in a module? Do I really need an API endpoint to call and pass to the front end?
Is Node JS supported or not - has anyone done this before?
Also, in one link above they said everything is "serverless". But if I have to set up my own API endpoint won't I need to set up my own server??
There are basically two ways to go about this, which you seem to have already discovered.
Write your backend code in your Wix site. Indeed, the backend is built on Node.js as you can see here. Using this approach you will have to use JavaScript. As you seem to have found, you write this code in the Backend section of your site in a Web Module. Pros: you don't need to worry about managing a server and all your code is in one place.
Expose your already existing Java code as an API that your Wix site can call using the wix-fetch API. Pros: you don't need to rewrite your code.
I understand that this is a very broad question and could get flagged but I need inputs from experienced programmers and will ask it anyway. If there is another forum where I can post this question, please let me know.
Currently we manage all our application information in an Excel spreadsheet. At a high level it contains an app id, the server names that it is hosted on and the name of the environment. The Excel spreadsheet has become too large and I am looking to build a simple application for it.
Ideally, I would like to write this app on Windows as everyone uses Windows but dont know how to go about it in Windows. I then thought of using MySQL and PHP or Perl (CGI) to build this but thought of exploring something new. I read about Joomla and a few other CMS products which make it very easy to build websites but am not sure whether these allows me to pull information from a database.
I am seeking inputs on what would be a good way to way to build this application.
Use Joomla! CMS is a good choice and to pull data from database you may use webservice calls. So, you will able to create a CMS website using joomla and will able to pull data easily from database with the help of webservice.
You can get webservice support in joomla by installing component redCORE in joomla.
Component: https://github.com/redCOMPONENT-COM/redCORE
Wiki: http://redcomponent-com.github.io/redCORE/?chapters/webservices/overview.md
Other videos: https://www.youtube.com/watch?v=UzJkC7f9fJE
https://www.youtube.com/watch?v=1NRT5jh3Ewc
Joomla dev group discussion https://groups.google.com/d/msg/joomla-dev-cms/3OctbkIZlQw/5d_1MLrzbgYJ
You can also post questions in Joomla forum http://forum.joomla.org/
I think Joomla is a great option to handle big loads of information. If you already know PHP and don't need to reinvent the wheel, it's cool. The way of handling data in Joomla is using Components.
If you want to try, it would be as easy as installing a local copy of Joomla, building the field structure on component-creator.com installing it and importing the data inside the component using phpmyadmin.
I'm building a Windows Phone 8 app that needs to get data from a website that was built on Joomla I believe.
Is it possible to create a Webservice that my app can consume?
Or is there a better way?
The Joomla version is 2.5.9 I believe
You will have to write a service layer in your CMS. Then data which are required for the android app will be exposed as a data service from your Joomla CMS. Please check the link for more info.
How to write a REST API?
Just in case you're not aware there is a range of critical bugs and exploits that have been fixed since 2.5.9. Your client should update to 2.5.16 ASAP as there is a well known exploit that can be used to effectively root the site in a matter of minutes.
After updating, you could look at the AJAX interface that Matt from Between Brain created for most versions of Joomla (it's actually part of the core from 3.2 onwards).
That would be the simplest way to get started as it provides a path in that can be authenticated etc and extending it to other non-core extensions is relatively trivial.
I'm starting a new project with codeigniter, and I'd like to start on a system that's already built so I can reduce the time of development.
Is there a good system that handles user authentication along with an admin interface to manage users that can be easily expanded to a web-app?
If this is too vague, I can expand
This thread here appears to have some answers
But the question was more about libraries. Either way, implementing some of the things on that thread would save you time.
You're looking for is a Content Management System (CMS).
There are a few ones out there that use Codeigniter as a framework for their CMS.
Edit: Even if you can't find a boilerplate CMS that you like, you can google about CMS's to design a simple one of your own as there's LOTS of tutorials and information about requirements and such when you know the term CMS.
I recommend Redux Auth for CodeIgniter. It comes with an example implementation, and can easily be used to manage user authentication for your CodeIgniter site. I just implemented Beta2 with the latest version of CodeIgniter, so while it's not actively updated, it still works with the latest build.
I'm using Bonfire as default admin interface.
I've just started looking into Bonfire:
Bonfire helps you build CodeIgniter-based PHP web applications even faster, by providing powerful tools and a beautiful interface you won't be ashamed to show your client.
Ready to customize Admin Interface.
User Management with Role-Based Access Control.
Fully Modular codebase.
Built around HMVC.
Database backup, migration, and maintenance.
Powerful, parent/child capable theme engine.
Simple Email Queue to keep your ISP happy.
UI-based module builder.
Looks good at first glance!