Jump to content

Time-saving tips


onjegolders
 Share

Recommended Posts

Was just wondering what time-saving tips you guys have from one project to the next. Are there things you carry over? Every time you add a contact form do you code it from scratch? Or do you go to another local project and copy and paste code over?

I'm just conscious that though the main reason I love PW is that I code it all myself, line by line, it also means I probably end up spending too much time in the nitty gritty.

So do you have any time saving tips?

Am also interested in your workflows within the admin section (think I've asked this before).

Is there anything in particular you've learned that helps you get your PW projects up and running faster?

Cheers!

Link to comment
Share on other sites

This is not specific to PW projects, I would use the same approach or techniques for plain HTML sites or projects with a blog system. This is because I always start with an HTML prototype which later is converted into a PW template.

I actually have … well, I wouldn't call it a framework, but a “starting point”, a boilerplate. This is derived from the HTML5 Boilerplate and combined with some basic CSS and JS stuff. Just some reliable CSS (see later) snippets and jQuery plugins I use often or all the time. Having (and knowing) that helps a lot, but beware - it can result in repeating yourself in your designs. I also have a (small, but growing) collection of PW snippets, most of them stripped from the default page profile or used in projects. (Also saves me having to look it up in the forum again.)

Two other things which have really helped me to save time … well, it's not so much about actually saving time, but more about saving nerves by not having to manually do things … anyway, it's using a CSS preprocessor (I prefer Sass/Compass, but I honestly think it doesn't make a big difference if you prefer LESS or Stylus) and a build process to automate things (I have recently switched to a Grunt-based build system, but other build scripts should work just as good) like combine/minify CSS/JS, optimize images etc.

  • Like 3
Link to comment
Share on other sites

Thanks Yellow, are you aware of any PW snippets for SublimeText2? I may have to look into that.

I do have basic HTML and CSS snippets to get me up and running was just wondering if there were any specific tips directly realting to Processwire and maybe even the admin side.

Link to comment
Share on other sites

ProcessWire modules are by nature meant to save time. There are 3 modules that I think can be big time savers on almost every project:

  • The MarkupPagerNav module included with ProcessWire is hard to imagine being without. Yet, I was doing pagination without this for a long time before making it, and... things get done a lot quicker now. :)
  • The MarkupSimpleNavigation module can be a big time saver when it comes to many common navigation scenarios.
  • The FormBuilder module is a big time saver when it comes to creating forms. It's turned the most annoying and consuming part of development (for me at least) into one of the quickest and easiest.

When it comes to front-end development, I'll admit that I've always preferred starting from scratch. But lately I've been enjoying what some of the CSS frameworks like Skeleton, Foundation and HTML Kickstart bring to the plate (and Twitter Bootstrap I'm guessing, but have not used it). With the appropriate project, these are huge time savers. The project I'm working on now (for a boarding school) needed to be responsive and very unique in design, and I found Skeleton to be the perfect balance there. It provides just enough to make things responsive, and very little else. That left little room for the design to be influenced by the framework (which was desirable in this case). If I didn't need responsive on a particular project, and could let the design benefit from some framework influence, I'd go straight to HTML Kickstart as the biggest time saving framework.

Lastly, I'd say that using the Basic Profile as a starting point has always been a big time saver for me. Almost every site I build needs the core framework of fields and templates included with the basic profile. While all the markup and CSS ultimately get replaced, it saves a lot of time having these things there ready to implement.

  • Like 6
Link to comment
Share on other sites

Thanks Soma and Ryan, some great tips there.

Ryan, I'm with you on your methods, hard to imagine me not using some sort of responsive framework from now on for the majority of sites.

I do like the idea of profiles, I can feel that many of my sites will benefit from having proper login/out, profile sections.

I wonder whether you will consider making more profiles (like the Blog one) perhaps as a commercial venture?

Link to comment
Share on other sites

I wonder whether you will consider making more profiles (like the Blog one) perhaps as a commercial venture?

Definitely, I think this would be a good thing to do. I'd like to see (and create) more profiles (whether free or commercial). This is one area where we don't have much to offer yet, but it's so easy to do, so I think I'm going to have to dedicate some time to this once 2.3 is out.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

Thanks Yellow, are you aware of any PW snippets for SublimeText2? I may have to look into that.

I do have basic HTML and CSS snippets to get me up and running was just wondering if there were any specific tips directly realting to Processwire and maybe even the admin side.

I love SublimeText2.

If someone experienced with ProcessWire were to share some snippets for general use, I think that would really help many users.

  • Like 1
Link to comment
Share on other sites

Perhaps slightly off-topic (or on-topic but from a programmer's twisted pov.)

When dealing with object oriented PHP code, I like to keep things terse and also like to be able to chain things straight from when they are constructed (kind of like the fluent style) -- but PHP doesn't let you do it. So, when I want to to do this in various parts of my code...

 echo new somethingOrOther()->set('size', 'big')->render();

...PHP only lets me do this...

$thing = new somethingOrOther();
echo $thing->set('size', big')->render();

Yikes! However, if I define a function (once) called newSomethingOrOther() then I can get what I want easily...

function newSomethingOrOther() { return new somethingOrOther(); }

// The following now works as I want, however many times I need it in my code...
echo newSomethingOrOther()->set('size', 'big')->render();

Ok, end of diversion, as you were.

  • Like 3
Link to comment
Share on other sites

Not seen it done like that before. Will try that out too.

It definitely works, I've used it before :)

Those are pretty awesome tricks! But do these things really save time, or do they just save space? :)

As well as Netcarver, I like the fluency of it, it reminds me jQuery, you know:

 $('#SomethingOrElse')->DoThis()->DoThat();
Link to comment
Share on other sites

hi onjegolders,

99% of my projects i start with skeletongrid, which - from my point of view - is the most convincing css framework out there.

in addition, i do heavy copy-and-paste from projects i've done before. that saves me the most time.

i'm coding in sublimetext 2 (which doesn't seem to be developed further - very sad!). i have a huge collection of textpattern snippets but didn't start with pw snippets as i didn't need it so far. most is plain php, so why have pw snippets?

regarding the admin workflow: i try to do as much as i can via the api. that's a huge time-saver.

i've developed in contao, textpattern and pw. all of my projects always take longer than estimated (maybe that's why i dont have a fancy car and go playing golf). but at the end of the day i must say, that i'm most productive with pw.

best, christoph

  • Like 2
Link to comment
Share on other sites

ah, maybe this is the only timesaving hint i have :-) - i have a private wiki in evernote where i archive usefull posts, snippets etc. i find out there in the forum or in blogs etc. i also have checklists in evernote, for example how to install pw at hosting xyz. i consult this wiki quite often.

  • Like 1
Link to comment
Share on other sites

As the complete newbie here, I haven't had a chance to take anything from previous projects yet.

However, the test projects I am developing are very much aimed at doing exactly that - mostly from the template point of view.

So I am trying to split the markup up a bit by using inc files. For instance, I have a very small file that displays fields for a news post, another that will be an index for the same news, another that is a bootstrap collapse widget for the same news - all grouped together.

Next time I do a site that needs a news, I will create the same named fields just reuse these mini-templates and include them into whatever main templates I am creating.

It does make me think of the idea of "Sub Profiles"

These would be addon bits that could be put onto an existing profile rather than replace it. I haven't thought this through properly (actually, I have literally only just thought of it).

Each one would be a template (or incs, maybe), associated fields and their DB tables and would just add some premade functionality that would then need to be incorporated into a system by the designer.

I don't know ... there maybe something there.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Thanks Yellow, are you aware of any PW snippets for SublimeText2? I may have to look into that.

I do have basic HTML and CSS snippets to get me up and running was just wondering if there were any specific tips directly realting to Processwire and maybe even the admin side.

I found this earlier today!

https://sublime.wbond.net/packages/ProcessWire%20Snippets%20-%20Basic

https://sublime.wbond.net/packages/ProcessWire%20Snippets%20-%20Advanced

  • Like 2
Link to comment
Share on other sites

 Share

×
×
  • Create New...