Joomla CMS and Spring Framework - spring

I want to create a Web application by combining Joomla CMS with Spring Framework. What would be the best way to build/use a single sign-on for both?. All the pages on the website will be serviced by Joomla CMS, but those that require authentication/authorization will be done with Spring Framework. The later will retrieve widgets from Joomla CMS to ensure the same User Interface.
I would appreciate any suggestion or pointer to information about this topic
Thanks
Peter

You can overload Joomla User plug-in, save/edit/delete/login/etc. This will hep you understand user event that you will need to implement, http://docs.joomla.org/Reference:User_Events_for_Plugin_System. Also look at the following file plugins/user/example.php
In my opinion, mixing 2 different languages PHP and Java in 1 project is a little extreme. I would keep the projects separate and created my own Joomla/Spring Field API. Then would make API call in Joomla components/modules/plug-ins to integrate with Spring Framework.
Another thing, do not modify Joomla's native code to achieve what you want (I mean don't rewrite base classes that Joomla uses). Instead create your own library in the /libraries/ directory and extend the classes. If you decide to adopt API, you might want to have some API object in your model. Create your own base model /libraries/your_lib/application/component/ then when you are creating a model in the component change the import code to jimport('your_lib.application.component.model')

IOPLEX sell a Java library (Jespa) to provide single signon using Windows NTLM credentials, they also have a Joomla plugin. Could be appropriate if you're authenticating against ActiveDirectory and have Windows clients.

i think using web service will give the chance to not touch the basic code of joomla because joomla give you hand to make an xmlrpc , and you have to keep in mind the session controle the best think is to let joomla manage session and creating a user plugin to make a specifique action in the login and logout event. hope will help.

Related

Joomla component development (working with tables, users, configuration)

I need to develop an extension for a Joomla website which should have this functionality:
create and work with tables
work with the current user object
determine user permissions and type (registered or guest).
need to provide configuration options for different parameters
Can someone point me where I can find the relevant information?
The building block for a Joomla extension is the so called component. It's important to understand the different extension types. If you don't know how things are called, you don't know what to search.
My advice is to first experiment with existing tutorials. Focus on understanding Joomla and not on fulfilling your specifications.
Creating a component
First step would be to build a basic component. There are numerous tutorials. Developing a MVC Component. Building Joomla Components.
Current user object
Read the basics on Accessing the current user object
Determine user permissions
This is rather a complicated thing to grasp at the first time. Read on the subject by searching for Joomla ACL - Access Control List.
Providing options in the component
Short introduction is provided at How to get component parameters?

Joomla - Creating a web service that can consumed by a Windows Phone 8 App

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.

asp.net mvc 3.0 Global Filter for SSL pages

I’m in the process of creating a new C# asp.net mvc 3.0 project.
The web site will hold some public pages (such as: Home, about us, contact us, etc…) and hold some SSL enabled pages (such as: Login, Forgotpassword, Signup, in addition to all the pages in the application that the user will see after a successful authentication).
I’m curious to hear your thoughts (an opinion), before deciding on a particular approach.
I was thinking of using the Global Filter approach provided in MVC 3.0 in order to verify what are the pages being accessed…if the user is accessing public pages them make sure he’s in http:// if the user is accessing an SSL page then make sure it prints out the https://
Would the Global Filter approach be appropriate for what I’m trying to achieve?
Is there a good blog post for MVC 3.0 with such thing? (Currently googling).
Feel free to show me how or even propose an alternative.
Thanks
Sincerely
Vince
I believe this is what you are looking for...
http://weblogs.asp.net/jeffwids/archive/2010/08/19/how-to-switch-between-http-and-https-in-asp-net-mvc2.aspx

Creating Joomla Accounts outside of a web interface

Is it possible to create a Joomla account outside the web interface. I want to create one from my Java application. If so can you give me an idea about the best way to do this?
These are my thoughts so far:
1. Create a php page that inserts the data directly into the database (but is there more to an account than simply the users table).
2. Posting the data to the register page (but will it then detect that I am not using the web interface)
Yes, it's possible. You can:
Use php to achieve it, inheriting from JUser class like explained in this thread;
Create a component using JUser in you Joomla installation, and use xml-rpc to register users using this component by calling a service from you Java application.

How to create my own form in joomla

I want to create my own form that are submitted and values of that form will be stored in joomla database. How can i used the Joomla connection code to interacte with the joomla database.
If you just want to get your work done, there are some components already avaiable in Joomla Extension's website to your form's needs. CkForms is a good one, you can create simple forms with it that are automatically saved in the database (supports upload of files too).
If you want to learn how to write extensions in Joomla, you should read Joomla Official Documentation website.
Extensions in Joomla are divided in "Components", "Modules" and "Plugins". More informations about these differences can be found here and here.
What you're trying to achieve sounds a "component" to me. Downloading the CkForms and reading it's source code should get you started to Joomla's way of writing components.
EDIT: Joomla has a huge API with a lot of features. It has a database module of it's own, with insert methods and such. Reading Joomla's API website before implementing your component it's a good idea to avoid "reinventing the wheel" and it's a good practice since those methods are extensively tested by all Joomla users.
The JForm class helps you build forms.
Documentation can be found here:
joomla CMS: http://docs.joomla.org/API16:JForm
joomla API: http://api.joomla.org/11.4/Joomla-Platform/Form/JForm.html
This class provides you with ready to use form elements and form loading and/or processing methods
This class includes validation methods, date picker control, color picker, etc.
Of course, as another mentioned above, if you are building a module, component, or application, you will need to learn how to to develop a module, component or application. Of these three, the module is the easiest to implement.
The application gives you much freedom b/c you are not constrained to the CMS paradigm, front and back end complexities. However, there is little documentation about how to develop applications with Joomla framework b/c joomla as a framework is relatively new
This tutorial gets you started understanding how to use JForm to create a form in Joomla: http://www.ostraining.com/blog/how-tos/development/getting-started-with-jform/
Or you could just create add a html module to any position and then write the form in html i.e.
<form method="post" action="mycreatedpage.php"> <input type="text"/> <input type="submit">
Now just create a page that handles the code by emailing or inserting into db. I havent tried it but i think it should work.
Looks like everyone already told you almost everything I know except for the component creator. Very easy to use, and it follows Joomla standards. Will get you up and running within minutes.
I have got good working experience with Joomla RSForm Pro. It has got options for
validation
user email/admin emails on submit
file uploads
and many more
Good tutorials too. Get started with http://www.rsjoomla.com/support/documentation/view-knowledgebase/21-rsform-pro.html
Good luck!
Create View.
Create Model.
Create Table.
Create Controller ( if Needed ).
Create Form xml file.
Go here for more information:
http://docs.joomla.org/Standard_form_field_types
Take a look at the Chronoforms extension - does more than you want.
You have two options:
Use an already built custom form extension
Create your own custom form extension (or outsource it)
Now if you only want to modify the user registration form, then you can do some PHP customization to accomplish your goal.
Making forms in Joomla can be done in a couple of ways.
If you just wanted a contact us, you can just create a page with a menu item for the User contact form. This gives you a page with a Members address and contact form. So all you would need to do was add the user as the company of the websites home address and email. But the form is very basic, name, title, textarea for message.
Next up from that you could just make a Custom HTML module add add a form to it in plain HTML like +Sean said above this, you would need to code in PHP your own form process script. You would not get error in form data checking unless you also wrote it.
Next you might rather look on the Joomla Extension Directory JED for one of the good extensions for 3 and 2.5 Joomla RSForms!Pro is good, and can do all we have needed. This lets you add fields one by one and move your form around. Then can auto generate or custom the html of the form.
You can easily create your own forms with Fabrik
Chronoforms are now a days a very popular solution for custom forms in joomla. Chornoforms support twitter bootstrap also. In simple 5 steps you can create a contact form with unlimited fields and also embed various function like DB save, Email, Thanks Message, Redirection on any page. There is events and events will have particular events.
Also possibility of extension of Normal joomla registeration. It will not extend the core registration but at the time of registration you can take various information from users.
I would use Chrono Forms, they work really well and are easy to use.
Download here
Here is a full tutorial on the new Chronoforms 5 to help you get started quickly and understand most of the features available.
CLICK HERE
You can use plugin to insert external php form in content. It is easy and you don't need to make plugin etc. Please use this.
I suggest you to use breezingforms: http://crosstec.de/en/extensions/joomla-forms-download.html
It's one of the best solutions for custom form creation in joomla.

Resources