UI for dynamically adding multiple values like the LinkedIn skills section in Grails - ajax

I have recently started developing web applications using Grails. I just wanted to know how can I convert the multi-selection list provided by Grails scaffolding for many-to-many relations (where you hold Ctrl to add multiple values), to something where I add one value at a time and it has a X to remove the added value and a + to add more. Something similar to the skills section of LinkedIn or the way we add tags in StackOverflow while asking questions.

I would keep the multi-select boxes as they are provided by Grails, but would then use Chosen (a javascript library) to make them nicer.

Related

Thymeleaf with Spring MVC 3

I have to decide on the view layer technology to use with Spring MVC 3 and I came across Thymeleaf.
Has anybody worked with Thymeleaf or has any experience with it. What will I gain and miss if I happen to choose it to work with Spring 3.
I wanted my front end designers to feel comfortable was why I was thinking if I could use thymeleaf with Spring 3 and still have all the functionalities we get with JSPs + Spring MVC 3.
Thymeleaf and Spring are a very nice match. The spring integration of Thymeleaf is done as it's supposed to be and it was nicely documented how to get started.
I use this combination since one year in several projects and I'm still happy with the choice I've made at the time.
Thymeleaf propagates the so called "Natural templating", which means that the templates can be viewed without the template engine, they are html files with additional tag attributes which browsers just ignore.
This means that a webdesigner can design the page, hand it over to the developer and get back again if changes to the layout have to be made.
While I liked this idea a lot in the beginning, I soon realized that, as developers, we tend to create components to be reused. This results often in templates having either not alot to display or also an extreme amount of elements.
Imagine some switch statement in a table cell component which renders either checkbox, textfield, select box, and so on. The table template including this cell fragment does not resolve it without an engine. Or imagine the header fragment with all the style and js declarations. Css will not be available in plain file mode.
But you can add additional html tags and remove them during processing. So natural templating is still possible. Just a lot to write :)
There are support extensions around solving this issues (using JS to pull in the fragments for example) but I havent used them as my applications are normally deployed within 30sec and I'm even able to change the templates on the fly without a redeploy.
After you also have a quite nice eco system around thymeleaf. The ability to extend Thymeleaf is done in a way I really enjoy! (Having written two smaller extensions myself).
I prefer the layout dialect instead of the include approach. That's a matter of taste i would say.
Choosing Thymeleaf over Plain JSP is clearly favorable from my point of view. Take a look at the webpage and decide for yourself ;)
I'm working with Spring 3 and Thymeleaf for a year and think it's a good choice. I came from Grails and Play and look for a good alternative and created FuWeSta. You can look at the rudimetar sample-app.

what is simple MVC based PHP blogging application?

I am searching for a Blogging tools like wordpress. But I want MVC based tools to extend my blog with MVC structure.
My main requirements is
Must be based on MVC
Simple & lightweight
it's blog url structure should be domain.com/cat_name/post_title , because my current wordpress blog is like that, I don't want to lose Facebook Share and Tweets.
I want a simple one, because this is learning only.
Clarifying: if a CMS you use is based on a MVC design pattern or not is irrelevant to you as an user, except if you want to meddle with its inner workings (which you don't - a CMS is made to be used and possibly extended, but in 99% of use cases, if it isn't extendable to your needs, changing the source code is a bad idea, as it will most likely break with any updates you may want to make)
You may want a MVC framework, which will in turn allow you to **code** a CMS of your own, or use a good, extendable, CMS app
The one I use is ProcessWire, which is a CMS/CMF (F stands for Framework) php app, and seems to be the kind of thing you are looking for - it manages your content for you (the default installation comes with a few demo pages) but you define the fields, and you use them to display your content at will. Check it out - the user forum is quite active, and people there are really helpful.
Well there are tons of Content Managment System Based on MVC frameworks (eg . CodeIgniter ) . I personally recommend Pyro ( Based on CodeIgniter) but other also seem promising . but i don't know much since i haven't tried .
Note that this is a highly relative question and will bring forth a ton of opinions and not real answers. With that in mind, here is my answer.
I know of a tool that you can use to install an MVC template for and on top of ProcessWire along with basic project managing tasks using gulp. Note, the M will be considered ProcessWire.
Have a look on github.com and look at the profile of fixate and repo generator-fixate-pw. (ie: generator-fixate-pw, added the sentence if the link breaks).
Install this by following the instructions on the repository. The tool is very specific but learning to use the framework helped improve my php skills allot (still learning allot).
Whether the CMS will be used as a blog or not will depend on your implementation of the install.

Should I build my own PyroCMS module...?

I'm using PyroStreams on my PyroCMS-based site, which is working great, but the front-end search functionality it offers is a bit too limiting for my needs.
My stream consists of over 20 fields. On each page of the site I want a simple keyword search box which will search on 3 of the fields in my stream. Currently I'm using the PyroStreams search form for this and it's working great.
But I also want an advanced search page which will build a form based on all 20 fields, pulling in data from the stream to build it, e.g. in my steam I have a field-type of Country and on my advanced search form I want to include a dropdown list containing all the countries found within that field-type.
What I'm asking is what is the best approach to doing this?
Should I build my own module, separate from the PyroStreams module to perform this, or is that a bit of a sledgehammer to crack a nut?
I'm a bit of a novice in this field so all help & advice is greatly appreciated.
Tony.
Just Grab sample module from here...https://github.com/pyrocms/sample and understand the folder and file structure.. Its quite easy to develop custom module in pyrocms.You just have to provide basic module detail in the detail.php to install the module. then create a new controller with the same name as module in controllers folder and same for the view and model. you can easily understand once you will go through the sample module..
url stucture will be like this
{{ url:site }}controller_name/method_name/paramate of method.
Hopefully this will help you..
This is a late answer, but PyroCMS now has a search module.
You can see the documentation to learn how to use it from a developers point of view here:
PyroCMS 2.2 Search Documentation

From drupal to web2py: taxonomy/tagging and comments?

I have some sites that I implemented using Drupal. However as cool as Drupal is I've never been satisfied with coding in it mostly because it's in PHP and I've wanted to work with python. I've flirted with Django but I just recently discovered web2py and it's definitely caught my eye. Seems like it may be a sweet spot between Drupal and Django. Although django-cms is also on my radar.
So now I'm wondering how to re-implement my sites with web2py. Specifically suppose I have a site about DVD players. So in Drupal I'd have a CCK type DVD player, with various attributes. I guess this would correspond to a web2py model. How would I implement something like Drupal's taxonomy which is like a tagging system in web2py? Is there a module/plugin/appliance for that? Or am I manually creating the model schema to handle tagging?
Secondly, how would you handle something like comments and/or reviews on posts? Again, is there a pre-built plugin for this or do I have roll my own?
For tagging, I don't think web2py has anything quite like the Drupal Taxonomy module, but there are some options. First, you could create your own many-to-many model to assign tags to items. Another simpler option is to use web2py's list:reference field type to de-normalize the many-to-many relationship (the end of that section in the book includes a tagging example).
For existing tagging solutions, you can also check out web2py's plugin_wiki, which includes a tag widget. You can get it from the download page, or pull the source code directly. Another option is Powerpack, which includes the Instant Press CMS, which includes tagging and categories functionality.
Also, both plugin_wiki and Powerpack include comment plugins.
Finally, you'll generally get more and quicker responses from knowledgeable web2py users on the web2py mailing list.

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