Joomla 3: Why do we need form modules when a CustomHTML article can suffice? - forms

As a Joomla (novice) developer, I'm concerned about why we really need modules to create our own forms. I'm definitely not an authority on the subject when it comes to Joomla but here's my issue.
I understand (through hands-on discovery) that we can create forms using two ways (without additional custom modules).
By writing the form content straight in the index.php page, then checking for submit using PHP.
By inserting the HTML content for the form as a CustomHTML article using the admin back-end. Then have a separate PHP page to do the processing and return back to a specific landing page.
First I'm not sure if the above methods are considered sane in the joomla world but I do think they're workable.
If so, why do we need to run through rough seas trying to download and install form-builder plug-ins and write code that looks pretty absurd with so many files.

The first solution you mentioned is the worst that could be done. Editing the index.php should never be done. If an update for the template is bought out and you install it, it will override your changes.
The second point you mentioned is also a bad idea. There is no point in using separate PHP pages if you're using the Joomla CMS.
Stick to Joomla standards and create a custom module (not custom HTML module) either by coding it yourself or getting started with a Module Generator.
The whole point of using a CMS is to make life easier. A Joomla site is built of of Components, Modules and Plugins.
Components are like applications such as a Forum, e-commerce system etc. Modules are like widgets such as a twitter feed, shoutbox etc.
Plugins change the behavior of something.
why do we need to run through rough seas trying to download and
install form-builder plug-in?
Trying to download and install a form builder is not difficult at all. Simple go to the Joomla Extensions Directory, go the the necessary category, click on an extension that suits your needs, download and install it and voilà.

Related

How to build plugins style web platform with angular2

The idea is not new, like Wordpress, Oxwall : a platform created by some guru guy that allowing other dev guys to add new apps (like forum, blog, market-place, whatever) into the platform easily. By easy, we mean either just install new plugin by upload or less user friendly coding new plugin without changing the core code.
Actually, we have a working solution with angular1 but quite clumsy, that's it, multiple stand-alone ng-app within a website, like:
domain.com/forum-spa
domain.com/dating-app-spa
..etc..
Good thing about it is quite straightforward to implement, not much to worry about lazy-loading. But we are not happy with that approach for many reasons.
Angular2 is really close. We hope it can bring a better solution for building a large web platform
iframe
custom components that are added at build time that are added depending on user data like explained in Angular 2 dynamic tabs with user-click chosen components
This approach is compatible with the offline template compiler
There is also a more flexible way that supports user-provided component templates How to realize website with hundreds of pages in Angular2
This approach is not compatible with the offline template compiler and requires the Angular parser and compiler to be included in the build output.

EPiServer migrate content from home grown CMS

Hopefully someone can help me, I'm new to EPiServer and have been given a data migration task. We are using the latest version 8.5. I need to migrate content from a clients home grown CMS (that luckily is in a tree like structure) to EPiServer. There doesn't seem to be a whole lot of information about this on the web - perhaps I just don't know the right thing to search for.
It looks like using the EPiServer.ServiceApi might be the route to go but again locating useful documentation is proving difficult.
I was thinking of setting up the client CMS in SQL Server and writing a simple console application to call the EPiServer.ServiceApi inserting the content. If anyone has any information on this or better still and example i would be very grateful.
Thanks,
Dan
If you are just importing content from another CMS I would write a scheduled job in EPiServer:
http://world.episerver.com/code/dannymurphy/Stoppable-Scheduled-Job-with-feedback/
That job then uses the standard IContentRepository to create content:
http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Content/Persisting-IContent-instances/
That way you can run it whenever you want and have access to EPiServers complete API. Also you can see progress of the import through the job status.
In the job you can read the content as a file in any format you like or directly from the source CMS database or some xml or RSS feed perhaps.
I have moved content from PHP, Java and .NET CMS this way. In .NET you could even access the source CMS via WCF or SOAP if available.
The ServiceApi is relatively new and more focused on Commerce products and media assets rather than CMS page and block content so I wouldn't use that.
There is complete documentation below for the ServiceApi by the way, did you not find it?
http://world.episerver.com/documentation/Items/EPiServer-Service-API/
Regarding language management you can read more in the below links:
http://cjsharp.com/blog/2013/04/11/working-with-localization-and-language-branches-in-episerver-7-mvc/
http://tedgustaf.com/blog/2010/5/create-a-new-page-language-branch-programmatically-in-episerver/
Basically you have two options for multiple languages. If the content is just straight translations you should create nine different language versions (branches) of the same page. You can also have multiple sites in an EPiServer installation but that requires 9 separate licenses (and the associated costs).
I've done a lot of EpiServer content migration projects. The easiest way if it's possible is to export your current sites tree in Json and then import that into EpiServer. I've had to do it on a recent project and mixed with Json.net it's pretty easy.
If you want to go that route you can find all the code to do it here: EpiServer Content Migration With Json.Net/

Best alternative to drupal for small-scale sites

I recently started learning about drupal integration and because I wanted to learn how to create sites that I give to people with no html experience who want to be able to update their site. Through my research I learned that Drupal is the best supported CMS. It really does have a lot of nice features and accomplishes the job, but it almost has too many features for what I want.
I'm assuming there is some kind of open-source software for
I am an aspiring web developer trying to build my portfolio/gain experience. What I've been trying to do is build sites for clients that I can lose complete contact with--so when their store hours change and they have no HTML experience, I get emails about updating their site.
I figure there are three approaches: (tell me if there are more)
I write a php app that allows them to edit their site
I use a CMS (Drupal) to let them edit their site
I write scripts that embed text files formatted with {white-space: pre;}
I've so far implemented each method on 3 different sites, and they all work with drawbacks. I would prefer an open-source alternative to writing my own app for stability/security. Drupal seems more oriented towards allowing multiple users to add content, whereas I only want one user update existing content. The third option works well for computer-literate clients, but anyone who can navigate onto their server to change the file could probably figure out how to update the site without any of these approaches.
To sum up my problem, can anyone tell me the term I am looking for? Content Management System refers to the site framework for sites with a growing number of content posts (correct me if I'm wrong). What is the term for the site framework for editing sites with predefined but editable pages? If you could please tell me that, then I can at least research this question on my own. Otherwise, if you have any advice or solutions, they are much appreciated!
Thanks
user1470887, you've asked a great question. The answer, unfortunately, is that too many of the existing CMS products overlook this use case. It doesn't have an exact name as far as I know.
The term "in-place editing" describes one version of this (user clicks text on web page, block of text becomes a form, user edits contents and presses submit button, new text is sent to webserver and saved, and the form becomes normal text again). But I gather you would be happy with anything that lets them edit-existing but not create-new.
I'm also guessing you don't want to build your own Drupal module or commission one.
I do not know Drupal well enough to know whether there's a Drupal module that meets your needs. I'd recommend a careful search, though, especially if you are already somewhat familiar with Drupal. (Yes, Drupal can seem like too much CMS at times.)
However ... if you can't find a Drupal solution or want an alternative to Drupal, MODX Revolution does have an answer: set it up and then install Bob Ray's NewsPublisher add-on. It will put an "edit" button on pages which a user has the right to edit, but not on pages where they don't have edit rights. (And of course users will only be able to edit the title, body content etc - not the entire page.)
Bob Ray has literally written the book on MODX (MODX: The Official Guide). I was able to successfully adapt NewsPublisher to a project last year similar to what you have described, with predefined pages that the user would only need to edit over time. The latest NewsPublisher version, untested by me, is said to be further improved and can now be styled much more easily using CSS. That should allow you to give your users a customised and consistent interface.
As andmag also notes, MODX is a very flexible system for web developers focused on the presentation layer. It has the best templating system going.
I'll recomend you to try MODX. It gives you big flexibility to run your php or html code.

Sitefinity and custom development

We are considering purchasing Sitefinity (or DotNetNuke) on pretty short notice and there are is a question I have that I am having trouble finding a quick answer to. (I have a separate but similar post with DotNetNuke as the focus, if you can answer that better or in addition.)
We are currently not using any CMS at all and we have some custom development that will not go away just because we go with a CMS for some or most of our site.
Our custom development is c# ASPX with Site Master and nested Site Master pages. These custom apps do not own their own top level in our web site, but are part of a branch, typically one or two levels down (for example, http://www.contoso.com/branch/app/default.aspx).
How is Sitefinity typically configured in a CMS/Custom “mixed mode”? For example, is Sitefinity installed at the “top” of the web site, or “where needed” down in the web site.
How does this relate when mixing CMS and custom web applications?
Does the CMS interface allow for adding these custom apps or do you just go to the web server and add them to the structure?
It appears from reading other posts, we can create our own custom c# modules and have CMS editors “drop in” the modules on the pages. Can someone confirm that for me?
If I did not provide enough detail, please feel free to ask for more.
We have Sitefinity installed at the root with plenty of subfolders containing custom pages. We typically build a usercontrol, add it to the sitefinity ToolboxesConfig.config file, then drag/drop it into a sitefinity CMS page. I believe this is what you're talking about regarding having "CMS editors drop in modules on the pages".
We also have master/child pages that are imported as page templates into Sitefinity and they work well. You can also link from any CMS page to a regular .aspx page out in a subfolder of your own and implement code there that uses the sitefinity API, but we personally found this much more tricky and veered away from this approach whenever possible.
So in a nutshell, custom code is relatively easy to integrate into sitefinity as long as you can condense it into a user control or master page.
Disclaimer: This was all done with regular web forms development. I'm not sure how an MVC site would interact with Sitefinity (which I believe is built using an MVC architecture itself anyway).
The part of your question I'm unsure of is regarding the custom webapps in nested branches. I would recommend installing the trial version of sitefinity and trying to get a single branch integrated as a prototype. This might take a day, but it would be worth it to know if the sitefinity route is going to give you heartache.
Full disclaimer: I work on Sitefinity.
First, let me say that throughout the history of Sitefinity, extensibility and developer-friendliness have been our top priorities. We've tried to create a CMS that uses concepts familiar to ASP.NET developers and build on top of them.
Now let me go through each of your points.
You can organize Sitefinity deployment however you like. In your case with sub-apps, you can either create virtual directories in IIS and deploy separate instances of Sitefinity in each of them, or you can use the CMS to do the sub-apps. In the CMS they can be separate branches of pages, have separate templates applied and feel like separate sites. You'll still manage them through one interface. It is up to you to choose an approach.
Sitefinity is a normal ASP.NET web application with the CMS assemblies in the BIN folder. You can open the project in Visual Studio and run it like a normal ASP.NET Web app. From a developer viewpoint, there's no difference between a custom app and a Sitefinity app - they are just ASP.NET web apps.
If you follow an approach of installing Sitefinity in the root and then using the CMS to create sub-apps, you can do it through the UI. If you choose to run separate virtual directories, you have to manually upload the files. Also, Sitefinity has a built-in File explorer, which you can use to manage the files on the server.
The modules you are referring to are called widgets in Sitefinity. For a developer, they are nothing more than custom ASP.NET controls and user controls. The Sitefinity page editor UI allows you to drop widgets in placeholders on a page and configure their properties. The placeholders are defined in a masterpage (a normal ASP.NET masterpage) or through the UI.
It is very easy to create custom widgets. Here's a Quick Start: http://www.sitefinity.com/blogs/gabesumner/posts/11-08-29/ldquo_hello_world_rdquo_guide_to_custom_sitefinity_widgets_amp_controldesigners.aspx
We also have modules, which are a little more complicated concepts. They manage data, have backend and frontend UI. I encourage you to go through our blogs and documentation for further info.
We also have an SDK, containing samples with source code for extensions to the CMS.
You may want to look at Kentico CMS that supports similar scenarios - you can easily mix your own ASPX pages and CMS-controlled ASPX pages, so it's very flexible.

Best Practice creating Forms in Wordpress

I was wondering what is the best practice for creating forms in Wordpress? As a developer I hesitate to use a plugin like CForms, but I can understand why someone would like to use it. In the end I want to know the following:
What is the best practice for creating forms in Wordpress? (Custom HTML/CSS with Javascript and PHP validation or just using a specific aspect of the Wordpress API?)
I don't use any part of the WordPress API for forms. You could automatically grab the name and e-mail address out of the cookie WordPress creates when someone leaves a comment, if you want to try to auto-populate some fields.
An easy way to handle forms is to use Page Templates. That lets you create a new PHP file for a specific page, overriding the default page template of the theme. Then you can simply have the form post to itself and this one page template handles the processing as well.
http://codex.wordpress.org/Pages#Page_Templates
A lot of what's available for WordPress in the way of addins, and what gets a lot of attention, is stuff that I find makes little use if you have programming and general web skills. Almost always they seem to (necessarily) overgeneralize a requirement with a zillion options and configuration requirements because they are first of all designed for non- or barely-programmers.
Just learn the fundamental paradigms, scratch your head and wonder why nothing is consistently abstracted and/or encapsulated, get over it, and use what you already know about php and HTML-based forms. WordPress doesn't add much in the way of either tools or constraints.
I find the Widget feature applies usefully to most everything these days, and Forms is a candidate. But that's my own WordPress viewing prism - YMMV.
What do you mean by "in Wordpress"? Do you just mean placing the form HTML in a Wordpress template? Or storing data collected in the Wordpress DB? If you just want to create a form on your site, there's nothing Wordpress-specific to worry about. I believe there's some special Wordpress data facilities you can use if you're creating a widget or plugin or whatever they're called now. But if you're not, just create the HTML, and point it at a target URL that processes the values and puts them in a DB, Wordpress or otherwise. That target URL could be a separate PHP resource, or the same page. If it's the same page, you just need to include your PHP somewhere in the main Wordpress flow.