I am trying to figure out the 'appropriate' way to implement Feature Management in aspnetboilerplate ABP/(actually AspNetZero)
Here is my specific business situation: I want to limit through Features/Editions, the number of Organizational Units a tenant is able to create.
Im not sure where this should be implemented. In the Application layer? My research in the code, for example ABPZero implements a IUserPolicy/UserPolicy to manage users creation. This is implemented in the Core project. But Im embarassed to say that I can't find and OrganizationUnit.cs class in order to implement this correctly.
Any help is appreciated.
--Dave
Related
This might seem stupid but I've had this question for a long while. I've been using ORO CRM DB and its API for a while now. Its really one of the good open source CRMs. I just wanted to know if I can use their database and create a Django REST framework around it and create the same functionality of what ORO API is offering.
I would rather build the API with DRF than learn PHP to get the functionality that I need. So is this question. Kindly help me in figuring this out. Thanks in advance.
TL;DR
Yes for read, but using application database is a bad practice.
Explanation.
In Oro codebase there is a lot of triggers (listeners, queue message emitters) that could be fired during the CRUD operations, you can't use another code base to just mimic it.
Actually you can try to use DRF for read operation, that is rarely trigger any events, but doing this (use external db that is tend to change) is a bad practice.
You can try to explain your use case to get more context of what you are trying to achieve.
I am building a recommender engine for our ecommerce application. The easiest way is to deploy the recommender system to java web server and implement a REST API for it.
I am trying to get the data from the database directly, but I didn't find any documentation that can help me to connect lenskit 3.0 to JDBC.
Can anyone please explain how to connect the lenskit to database and how to customize Rating.class, User.class and Item.class so it can contain the user country and city, and show whether the item is in stock or not ?
In LensKit 3, the way to work with custom data is to directly use Entity objects. Users, items, and ratings, are just entities; the User, Item, and Rating classes are view classes that provide convenience access to common attributes, but the base Entity interface allows you to use arbitrary attributes. The data model is documented at https://lenskit.gitbooks.io/lenskit-manual/basics/data-model.html; it is also possible to create your own view classes, but this is not currently documented.
To use JDBC, you will need to reimplement the DataAccessObject interface on top of JDBC. Building a reference implementation of this functionality is on the TODO list, but has not yet been done.
I just started with Joomla 3.x and I'm writing a component for Joomla v3 which is supposed to create new usergroups for creating 'groups'- the design requirements being:
An organisation may set up a group to offer access to some set of services -including communication but also also other types of services - to their members
(the other services is the reason why I believe the community and forum joomla extensions are not suitable- they mostly focus at fora and social media services, not the services I will implement.)
Other persons/members of the organisation may register to this group, which allow him/her to access these services
ps: it is also possible for person to set up a personal account and get access to the set of services. This person may also join one or more groups at a later stage
How to do code the creating of new usergroups? I noticed a possible suggested solution at How to create custom User Group Programmatically in Joomla 3.x, but I struggle to understand how to use the suggested JTableUsergroup class because of the limited documentation at http://docs.joomla.org/API17:JTableUsergroup(?) Does creating an instance of JTableUsergroup results in the creation of a new customer user group?
Another question: how to add users to a customer usergroup? The only hint I found was at http://api.joomla.org/cms-3/classes/JUserHelper.html - using the method addUserToGroup of class JUserHelper.
Many of the Joomla development concepts are well document but I could not find one for managing custom user groups...
Appreciate your help;-)
First, overall, the best consistent documentation of Joomla APIs is in the docblocks for the classes. Then to be honest what I do a lot of times is to search for where in the core the API is used. There are some great pieces of narrative documentation in the wiki, but on the whole I always start with the docblocks which are very complete. However in this case it's pretty simple.
You need to do something along the lines of
$newrow = JTable::getInstance('Usergroup');
//code to add your data
$newtable->save(); // Shortcut for check, bind, store
However, if I were you I would look carefully at UsersModelGroup because there are a lot of other things that should normally happen in this process such as running the user plugins. So I might include and extend that model (which manages the table class) rather than going to the table class directly. In fact your whole component might even be able to extend almost all of the users component or it might also be possible that you could do what you want with plugins rather than reinventing the whole thing.
In terms of assigning users to groups that is trickier because of some legacy things in the code. I think the setter followed by a $user->save() ($user being a JUser instance) is probably the way to go when adding to groups. What I probably would do is to write a custom JFormField that would manage opt-in groups because the core usergroup field includes everything. You could extend that and exclude the groups that you want to have only managed by admin.
Using codeigniter 2. Don't want to reinvent the wheel. Have tried Grocery_CRUD and found it takes as long, or longer, to learn it that it did to learn codeigniter.
Looking for crud library that makes sense, easy to learn so I don't reinvent the wheel.
Many thanks for any ideas.
You can use http://www.grocerycrud.com
It's easy to use with codeigniter.
Sample use
$this->grocery_crud->set_table('customers');
$this->grocery_crud->columns('customerName','phone','addressLine1','creditLimit');
$this->grocery_crud->render();
Also you can take look at https://github.com/jamierumbelow/codeigniter-base-model
This is very basic base model class for CI
Subjective but take a look at https://github.com/keevitaja/simple-crud-codeigniter
Why don't you try MY_Model to do all the CRUD functionality?
MY_Model
Just want to inform all you that I have released CRUDDER. This is a plug-in module for your application that works as a CRUD solution, ideal for systems back-ends.
CRUDDER is developed using CodeIgniter and Bootstrap for look&feel. You can develop your own skin appart from the Bootstrapped one. Full localization is possible. CRUDDER is designed to be intuitive and easy to use. The interfaces always show on-line help tips related to the CRUDDER itself and also to your database characteristics.
I'm attaching here an image of the CRUDDER example contained in the product web page so you can figure how easy it's to use.
On the other hand, you will find that configuration is very easy. There is no need to write code other than your own custom validation rules (more powerful than the CodeIgniter ones). There are only two classes: one contains all the functionality code and the other, Crudderconfig, encapsulates the configuration and localization parameters.
In contrast to other commonly used open-source CRUD solutions available, in CRUDDER all the table-and-field-specific metadata don't require to write code. All of this is contained in two "metatables", that can also be managed using the CRUDDER itself... so you use the CRUDDER to create your own CRUD rules (don't need to use phpMyAdmin, for example). This is a plus for users seeking for simplicity.
A full list of features is available:
Open the project web page
Among them:
Pluggable to applications not developed with CodeIgniter.
Sort, filter and pagination features, among others.
Soft deletes with unique-index collision avoidance.
Automatic menu-type form fields based on other tables content.
Extensible event triggering when a value is changed in a form.
Interface help tips for fields are contained in the database.
Designed with strong security in mind.
Take a look! Write me if you like it, have questions or want another functionality.
CRUDDER is released under the GNU LGPL license.
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.