I have recently started working with Drupal on the side and have had to tackle the limitations I come up against in the Views API. More than not I find it faster and more powerful to code it myself.
It is hard to create custom views that have a specific look and feel without create custom files anyway.
Creating the pages from scratch in a *.tpl.php gives me more choice and flexibility. I have done a couple of them now and it is almost as fast.
For a developer (since this is a programming forum) what is better in your opinion:
Views or Custom templates?
I'm not even sure what you mean by custom templates (please say you're not hardcoding SQL into .tpl.php files), but no matter what you mean, the answer is to use Views wherever possible.
Reasons:
Development speed - I promise you creating a View will be faster than a custom module 99.9% of the time
Stability - it has hundreds of thousands of testers
Security - it has the eyes of many on its code
Support - there are hundreds of contrib modules that interact with Views somehow
Maintenance - Views is a Drupal standard. Using custom modules gives your site's maintenance an unnecessary learning curve.
Upgrading - Views will provide an upgrade path from D6 to D7. Your custom stuff won't.
As for your "it is hard to create custom views that have a specific look and feel" point, I think you'll change your mind after a little time with template_preprocess_whatever() functions and overriding Views templates. You have absolute control if you want it.
Related
I'm looking for tools or libraries that load simple but old existing websites and produce an output which can be loaded into wordpress or other CMS. The goal is to keep the existing websites navigating structure and content.
Any hints?
What I've discovered is that it really depends upon the CMS. I would recommend a "tag-pair"-based CMS like the new Craft or ExpressionEngine's free Core version (there're others too) where you drop in a looping control area, replace the fields with the tags and then it just runs. I personally like those because they offer a cleaner separation between content and design.
I'm trying to learn Wordpress now and it's backwards of what you want - you create template environments and half the design seems to be controlled by the code. Great if you want to swap generic templates around, but if you customize them you're doing a lot of work. I'm looking at a site I inherited and conditional statements are a nightmare - half in the templates and other in the plugins themselves (Events, I'm looking at you).
For about a year and a half I used Codeigniter to build my sites. Then a client begged me to build theirs in Wordpress. I soon found the joy of using a CMS (if Wordpress can be called that). So for about the last 8 months I have been using Wordpress as much as possible to buld my sites - I made the content fit the design.
Well, I began to grow very tired of the limitations of Wordpress - I needed more control and flexibility over my sites. So, I have recently started using Drupal 7 (not 6.x - I really like the admin panel).
After working with Drupal now for a little under two months - I have begun to feel like I'm using Stone Age Tools to build Space Age equipment.
So my question is: does Drupal get any better? Do you really have to use Views to display your content? Asking for help on the forums is just a shake better than asking a wall. I feel like to do anything requires a module. Why? Is one better off sticking to a framework?
"After working with Drupal now for a little under two months - I have begun to feel like I'm using Stone Age Tools to build Space Age equipment."
Well, my intiial reaction is that this is what you're going to feel like you're doing when you're working with Drupal 7, which isn't out of alpha yet. A good number of the folks who maintain modules haven't started upgrading to 7 yet, and that means that you're missing out on one of the great features of Drupal, which is it's wide and deep space of premade modules.
Try 6.
Do you need to use views to display all content? No, not at all. You can go in, create a new module, and write the sql and presentation that you want. Or you can find a module that will display things for you. Or, depending, you might be able to get the effect you want just by adjusting the theme you're using.
(As a side note, using an admin theme really pretties up the Drupal experience. I'm fond of rootcandy, although Rubik is nice too. Problem with Rubik is that it's not on drupal.org.)
The strength of Drupal is that by using modules, you don't have to re-write code that someone else has written - you can instead take that code and modify it (with hooks) to do what you want. This means you don't have to write an authentication/autherization system again - it's there in core. You don't need to write up openid handlers - it's in core. You don't need to write code to integrate with twitter directly - there's a module that contains an api that helps out. You don't have to write an xmlrpc server from scratch - you can use the services module.
You don't need to write a website from scratch. Instead, you can start with Drupal, add most of the functionality you need, and then spend your time making it fit what your client wants.
Firstly, you can install the Admin module to pretty up Drupal 6 admin. You don't have to use 7. 7 is still in alpha, by the way. Garland sucks, but, Garland is just a theme- its not 'the' admin itself. The Drupal admin can take the form of any Drupal theme, which is useful in its own right, depending on the use-case.
In Drupal, you can create content types clicking through the interface in Drupal 6 or 7. As far as I can see in WP3, you have to script it. A few clicks vs scripting, the choice for me is not hard there. The first way is a lot more efficient, and a task you can hand off to a non coder to get done.
You don't HAVE to use Views to display content.
You -can- use Views to make the display of content easier, by telling Drupal to gather data and provide a Page, Block, or Feed to display . This lets you create specific sections of content for areas of the site. Otherwise, you would have to create a node, and hijack its template, run a direct sql query yourself AND write the pager functions just to show something easy like the latest 10 "Press Releases" content type. Then, if someone added a new field to that content type, you have to update all that SQL code and display code. Views makes your life easier in that respect. In minutes you can flesh out site sections and arrange content in a myriad of ways. In Wordpress, this method of arranging content without functionality of Views is/was a modern nightmare and a reason I do not want to use it at all unless its a blog and nothing more.
The Drupal Support Forum is tricky. Not all modules are as active as say, Views or Pathauto (being two of the most popular modules). However, SO is also at your disposal. I answer a lot of Drupal questions here. The trick to the Forum there is you have to ask it in the right spot. True, sometimes you may have to wait a few days to get an answer, then again no one -owes- you an answer for a free product. Thats the nature of open source.
Every developer has their favorite modules to use with Drupal, and more often than not, its the same 20 or so modules. It depends on what you are doing, what you are trying to implement. It's not that 'everything needs a module' its that Drupal is such a vanilla install because Drupal does not want to assume your purpose nor overwhelm with options. The UX is something they are trying to improve anyway, and popular modules are making their way into core.
Well, I began to grow very tired of
the limitations of Wordpress - I
needed more control and flexibility
over my sites. So... I have recently
started using Drupal 7
Why not go back to CI? Drupal certainly has it's strengths, but I don't think Drupal will give you any more "control and flexibility" than Wordpress.
If the standard modules/plugins, themes/templates, from WP, Drupal, or Joomla, fill your needs, then using a CMS can be a lot faster than building a site from scratch. But, if those CMSs do not fill your needs, you could find yourself "fighting the framework" and never really getting what you want.
You're just coming out from WordPress, which has great support and is relatively easy to extend to overcome what you call its limitations, if you know basic PHP, HTML, CSS & JavaScript. Every framework has its own potential/limitations.
As a user of WordPress my humble opinion is that you should have stayed with it.
As of you last question, It depends, to stick with one and only one framework has its advantages and disadvantages, the best of all is that you get to know it very well and eventually learn how to extended it. The bad part is that very often frameworks lose popularity and you are left to you own without an active user community and support.
Regards.
All of the popular CMS products (I'd maybe add Expression Engine to the mix) are great for 80% of what you want to accomplish and a huge pain to handle the other 20%.
That's just the nature of the beast.
On the plus side, it's OS so there's lots of people hacking away at it just like you which opens up the potential for someone else already having invented the wheel.
And with bulky enterprise CM solutions like SharePoint I find that you have to reverse the equation to 20/80 (ugh!).
If you're discouraged with Drupal and prefer to stick with WP, WordPress has many thousands of plugins, including ones that can overcome the limitations you're running into and make WP behave more like a normal CMS.
Just do a Google search for "top Wordpress CMS plugins." There's a lot of articles out there that can recommend ways to get WP to do exactly what you want.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm trying to write out a list of key Drupal competencies, mainly so I can confirm what I know, don't know and don't know I don't know. (Thanks D. Rumsfeld for that quote!)
I think some of these are really broad, for instance there's quite a difference between making a functional theme and creating a theme with good SEO, load times and so on, but I'm hoping you could assume that a half decent web developer would look after that anyway.
Just interested to see what people here feel is also important. I've edited the suggestions so far into this list.
Languages
PHP
MYSQL
Query
Drupal Skills
Research and install modules to meet project requirements
Configure the basic modules and core settings to get a site running
Drush command line tool
Create a custom Theme from scratch which validates with good HTML/CSS.
Able to customise forms, core, themes without altering core files but by using template.php or custom modules.
Can make forms from scratch using the API - with validation and posting back to the DB/email
Can create custom modules from scratch utilising core hooks and module hooks.
Be involved with the community, understand the naming conventions, CVS system and ideally have submitted some code or revisions.
Modules
It's not easy to make a must know module list, as not only is the modules you use very dependent on the site, but also how you use them. However the following are widely used:
Views
Know how to make basic views and blocks.
Know how to make more complex views with relationships and terms.
Know how to use hook_views_query_alter, to make complex queries.
Know how to use hook_views_default_views, to create specific views.
CCK
Know how to setup content - what field types to use.
Know how to create your own field_formatters - the foundation for theming CCK fields.
Hooks
The most important hooks to learn, to create a basic module are probably:
hook_form_alter() - change forms without changing code.
hook_menu()
hook_theme()
hook_nodeapi() - almost anything regarding nodes
hook_schema() - create tables
hook_install() / hook_uninstall() - create tables and clean up.
hook_perm() - when you need special access control.
hook_init() - things to want always to happen.
hook_user() - if you need to tap into user actions or modify the user object.
I good understanding of client-server architecture, how servers and browsers works. And knowledge of php and mysql, templates engines. And of course, you should also read Drupal documentations.
Able to create a custom Theme from scratch which validates with good HTML/CSS and also pays attention to usability and accessibility. (Whilst still looking kick-ass).
You usually don't want to create themes from scratch but from a starter theme like Zen instead.
For Drupal you will need:
PHP, it's a PHP framework, so to really understand and use it, you need to understand PHP.
SQL, the list of SQL serves that Drupal can use is growing, but you will need to understand * SQL, relational database and how to setup some basic architecture.
Javascript (and jQuery). Drupal uses the jQuery js library, so it will be a lot easier if you not only, know how yo use javascript, but also understand how to use jQuery and some of it concepts.
The hook system and how you can alter Drupal core and modules implementing hooks.
The naming convention for hooks, theme functions etc.
Modules
It's not easy to make a must know module list, as not only is the modules you use very dependent on the site, but also how you use them. The two top modules in Drupal is.
Views
Know how to make basic views and blocks.
Know how to make more complex views with relationships and terms.
Know how to use hook_views_query_alter, to make complex queries.
Know how to use hook_views_default_views, to create specific views.
CCK
Know how to setup content - what field types to use.
Know how to create your own field_formatters - the foundation for theming CCK fields.
Another module that I find very powerfull once mastered is Panels. It allows you to do a lot of complex and difficult things with very little and simple code. There is a lot of hooks you need to learn, and not much documentation. But once you understand Panels, you find that you time has been well spent.
Hooks
The most important hooks to learn, to create a basic module is probably:
hook_form_alter() - change forms without changing code.
hook_menu()
hook_theme()
hook_nodeapi() - almost anything regarding nodes
hook_schema() - create tables
hook_install() / hook_uninstall() - create tables and clean up.
hook_perm() - when you need special access control.
hook_init() - things to want always to happen.
hook_user() - if you need to tap into user actions or modify the user object.
You don't need to use all of these hooks all of the time, but they are some of the most used ones.
Great list so far! Some others for consideration:
Ability to use Drush to update or setup a site
Strong understanding of good best practices configuration for performance, security and SEO of a Drupal site (think launch checklists)
Having submitted a module to Drupal.org (however simple) or submitted a patch (the process of getting a CVS account and getting your first code in is instructive to the community and to standards)
You don't need SEO skills for templates, drupal usually helps with SEO alot. Ofcourse a developer who will slice a design must know that all headings must be done with h1,h2,h3,h4 tags. that's really basic one. everything all is up to drupal..
as for my opinion to be a drupal "developer", you need some very basic skills in PHP. Because drupal is really written without object-oriented programing, and without DESIGN PATTERNS, so these are two things is really makes you a programmer.. without them it just [sorry for this word] bullshit not a programming.
I think anybody can install drupal or wordpress or some cms-made-simple, systems if you have at least once connected to ftp in your life... to develop plugins for them is a requires basic skills of php. Ofcourse if you'll find skillfull developer then he will know oop basic, and will write plugins with OOP and that code will be really NiCE! =)
Being able to edit existing functionality (core or module) without touching the core or module and knowing whether to put it in template or a custom module.
As we anything web related these days, you really must have a good understanding of the HTTP protocol. You also need a good understanding of JavaScript, the DOM, CSS and HTML5. Knowing a bit of jQuery is not enough for a developer, you need to understand what your are doing with the DOM, HTML5 APIs and CSS in order to build features and behaviours into the browser. You also need to understand the Drupal JavaScript APIs, both on the server side (hook_library(), #attached, etc.) and the client side (Drupal.behaviors, etc.)
You also need to known the various APIs of Drupal. The Form API is not the only one. You need to understand the Menu system (page, access, title and delivery callbacks, how to pass parameters to them, etc.), the Queue API for asynchronous operations, Batch API for long running operations, Entities and Field APIs for user editable structured data, Theme API and Render Arrays for anything presentation, Cache API, Schema and Database APIs, File API, Cache API and the Localization API.
I am new to Drupal and I am figuring out a set of steps for developing a Web Application. I planned:
1) Develop the application without any template or graphic effect. Just create your nodes, your views, integrate some plugins and so on. Goal: to have a website up and running from a functional point of view
2) Customize plugins: if some functionality is missing, customize plugins or develop on your own
3) Choose Theme and Customize it
4) Insert graphic effects (ex. JQuery)
5) Fine tuning
I am learning Drupal so I haven't any experience. Am I figuring out correctly ?
There are different approaches. This is how I work:
Define the goal of the site
Define functions
Define menu / pages
Deleveop theme / templates. Either from scratch or themes you downlowd.
Replace dummy text with Drupal code to show content. Here you functions comes in to place.
Remebmer that a node i Druapl, is basicalle your content / your text when you write articles.
When I tried to learn Drupal, I summarized some content here : http://stiengfoto.wordpress.com/category/development/drupal/
If you never have used CMS before, find some tutorials and start with the very most basic things.
Drupal i a great piece of machinery, but it might not be the best choice as a web app framework. It depends what you want to do really, but usually web apps is a lot of custom code / logic. Here Drupal's complexity might become a hindrance for you.
If I was going to build a site or application I would probably do something like this.
Find all the modules that I need. This can involve
Finding the contrib modules that I absolutely need.
Figuring out if I should use a contrib module + alterations or build my own module.
Searching for modules that can solve a problem, looking for solutions to problems that seem common etc.
Do the actual development, and create the features needed.
This include functional jQuery like AJAX.
Theming - this can in some extend be done while developing.
First step is usually to find a good base theme for your design, like Zen.
Then you need to implement the design.
Add jQuery where needed for flashy effects
Test and bugfix.
This should be done while developing, but when all looks good, be sure to give it all some good testing to make sure that it doesn't fail anywhere.
our website resides on iis-server and is completely written with Expression Web using templates and pure html-pages based on those templates. There's also some slight functionality built using c# in code behind.
Now i've been looking into DotNetNuke 5 as an alternative, so that our content editors (no tech bg) wouldn't have such a hard time when doing updates, adding pages and so forth. Naturally we would like to keep our finely tuned css-layout and maybe add some additional functionality later, probably using DNN modules.
I'll begin with a broad question:
Are there any best practices for migrating into DotNetNuke from an existing website?
Any articles, blogs, webcasts, books etc. related to this question would be much appreciated!
https://www.datasprings.com/Resources/ArticlesInformation/MigratetoDotNetNuke/tabid/737/language/en-US/Default.aspx
http://forums.asp.net/t/843931.aspx
The last one is a bit older - not sure if these will help - I think the thing to do is sit down understand how DNN does its pages and menu etc and then map it out on paper
planning planning planning -----------------
No matter what going from html to dynamic system like DNN is going to take grunt work