11 Replies - 277 Views - Last Post: 22 January 2014 - 12:30 PM

#1 typhlosion  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 106
  • Joined: 09-December 13

best option for code consolidates

Posted 22 January 2014 - 09:34 AM

hi, I basically just need a program that will consolidate all of my code so it runs better on servers.

need to consolidate:

PHP files
javascript files(jquery)
CSS files

can anyone point me in the right direction :/
Is This A Good Question/Topic? 0
  • +

Replies To: best option for code consolidates

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9082
  • View blog
  • Posts: 34,130
  • Joined: 12-June 08

Re: best option for code consolidates

Posted 22 January 2014 - 09:39 AM

What do you mean "consolidate"? As in refactor? Point out errors? Are you talking a base IDE like eclipse or netbeans?
Was This Post Helpful? 0
  • +
  • -

#3 typhlosion  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 106
  • Joined: 09-December 13

Re: best option for code consolidates

Posted 22 January 2014 - 10:04 AM

sorry no I mean consolidate the code so it is on one line such as a .min file when you download jquery for example

This post has been edited by typhlosion: 22 January 2014 - 10:05 AM

Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10466
  • View blog
  • Posts: 38,785
  • Joined: 27-December 08

Re: best option for code consolidates

Posted 22 January 2014 - 10:06 AM

That actually sounds like a bad idea, as your code will be a nightmare to maintain. It really doesn't improve performance either.
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9082
  • View blog
  • Posts: 34,130
  • Joined: 12-June 08

Re: best option for code consolidates

Posted 22 January 2014 - 10:07 AM

Quote

on one line such as a .min file

Buh? Why would you want to cram everything on one line? You know it doesn't run any faster that way, right?

Side note - what is a '.min' file? is that something you are using?
Was This Post Helpful? 0
  • +
  • -

#6 typhlosion  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 106
  • Joined: 09-December 13

Re: best option for code consolidates

Posted 22 January 2014 - 10:34 AM

View Postmodi123_1, on 22 January 2014 - 10:07 AM, said:

Side note - what is a '.min' file? is that something you are using?


I am developing a online application that will use a lot of files which adds up to alot of lines of code, I just came up with this idea as juery does it with their files, they have a developer version of jQuery(multi lines of code appropriately indented) and they have a .min, the ".min" is just part of the file name and is what they put before the ".js" and this file puts all the code on one line to cut down application size.

This post has been edited by typhlosion: 22 January 2014 - 10:36 AM

Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9082
  • View blog
  • Posts: 34,130
  • Joined: 12-June 08

Re: best option for code consolidates

Posted 22 January 2014 - 10:56 AM

Ah, I see what you are getting at.

Have you checked out any of the major hits when you search 'web page minify'?
Was This Post Helpful? 0
  • +
  • -

#8 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5247
  • View blog
  • Posts: 27,066
  • Joined: 10-May 07

Re: best option for code consolidates

Posted 22 January 2014 - 11:13 AM

You can minify jquery & css, but I don't believe you can (or should) minify html. You certainly can't (& again should not) do anything like that with php.
Was This Post Helpful? 0
  • +
  • -

#9 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3524
  • View blog
  • Posts: 10,169
  • Joined: 08-June 10

Re: best option for code consolidates

Posted 22 January 2014 - 12:14 PM

my 2c: minifying (esp. with JS) is solely used to minify the bytes to transfer to the client. not more, not less. it has almost no effect on CSS, since CSS cannot be minified (except for some line breaks) without breaking the CSS rules or killing the CSS Paths. and for the above reason, minifying on PHP code forbids itself.
Was This Post Helpful? 0
  • +
  • -

#10 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5247
  • View blog
  • Posts: 27,066
  • Joined: 10-May 07

Re: best option for code consolidates

Posted 22 January 2014 - 12:25 PM

View PostDormilich, on 22 January 2014 - 02:14 PM, said:

it has almost no effect on CSS, since CSS cannot be minified

I was thinking of sass compiling css. Though I prefer not to do it, I once did some work for a client that required it. Thus why I didn't remember accurately & was thinking it was minification. My apologies :)
Was This Post Helpful? 0
  • +
  • -

#11 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3717
  • View blog
  • Posts: 5,981
  • Joined: 08-June 10

Re: best option for code consolidates

Posted 22 January 2014 - 12:29 PM

There are some PHP obfuscators and encoders (basically the same thing), used to attempt to prevent commercial code being stolen. However that won't make it "run better" or faster; quite the opposite, actually.

If you want your PHP application to run faster, looking into the various caching techniques:
- opcode (OPcache, APC),
- database queries and results (Memcached and APC cache are popular here),
- HTTP responses (things like Varnish. This is a huge topic by itself.)

That last one, in particular, can have a massive effect on most sites; sites where most of the content is actually more or less static.
Was This Post Helpful? 0
  • +
  • -

#12 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3524
  • View blog
  • Posts: 10,169
  • Joined: 08-June 10

Re: best option for code consolidates

Posted 22 January 2014 - 12:30 PM

AFAIK, no browser has a parser for SASS, so you have to convert the SASS file to a CSS file on the server. eventually, SASS makes it easier to write stylesheets, but it doesn’t makes them significantly shorter.
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1