Message from discussion
GSOC - API to compress and compile Javascript and CSS - Time for your feed back
Received: by 10.236.79.40 with SMTP id h28mr7109911yhe.48.1344331756864;
Tue, 07 Aug 2012 02:29:16 -0700 (PDT)
X-BeenThere: joomla-dev-platform@googlegroups.com
Received: by 10.236.124.176 with SMTP id x36ls327296yhh.1.gmail; Tue, 07 Aug
2012 02:29:16 -0700 (PDT)
Received: by 10.236.153.6 with SMTP id e6mr7534494yhk.20.1344331756165;
Tue, 07 Aug 2012 02:29:16 -0700 (PDT)
Received: by 10.236.153.6 with SMTP id e6mr7534493yhk.20.1344331756143;
Tue, 07 Aug 2012 02:29:16 -0700 (PDT)
Return-Path: <rc404m...@gmail.com>
Received: from mail-gg0-f178.google.com (mail-gg0-f178.google.com [209.85.161.178])
by gmr-mx.google.com with ESMTPS id u67si5027265yhi.7.2012.08.07.02.29.15
(version=TLSv1/SSLv3 cipher=OTHER);
Tue, 07 Aug 2012 02:29:16 -0700 (PDT)
Received-SPF: pass (google.com: domain of rc404m...@gmail.com designates 209.85.161.178 as permitted sender) client-ip=209.85.161.178;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of rc404m...@gmail.com designates 209.85.161.178 as permitted sender) smtp.mail=rc404m...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-gg0-f178.google.com with SMTP id h3so2154805gge.23
for <joomla-dev-platform@googlegroups.com>; Tue, 07 Aug 2012 02:29:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=PtSfw8BKlMM36KkgukAxGTlSKNU1r83y/8JHQcZHUSE=;
b=kVPcYao6LHkdryDWtbByPR1bcQ2s1hoXrkH/yrQ8zzkM6Iw8dBbi1hakIkoIrao+jr
2myWbt735AU6guRERGNS3LcPaaWBpJPTPRGyhV1ejB0sVoFOUPDqaWbYs1GYOjgq+gPL
pIWq6D+d47ZeDnOUmXtQkk+sO3v3bLiNZ9nk7C4u75IzAk+OV/iGhKGXwkvrPBzf2tsb
SpUHFAEOa7PzRU3geqJa1ou3S/ATVtkZX07298noZCE67E8oSVyp5MmRafgeS02SLzdm
zyB42MH2k1wTY1OEbXbjtmS/KIFoT7g+EekyYKmxESPRw/48+OiVqO4oRmzTsa7uWmJE
tYWw==
MIME-Version: 1.0
Received: by 10.66.75.97 with SMTP id b1mr24788893paw.15.1344331755565; Tue,
07 Aug 2012 02:29:15 -0700 (PDT)
Received: by 10.68.241.35 with HTTP; Tue, 7 Aug 2012 02:29:15 -0700 (PDT)
In-Reply-To: <a6dee4c5-4ae9-44be-85e8-12ab2ae13...@k13g2000yqk.googlegroups.com>
References: <0c54cbf8-5438-455d-943f-3044346eb4e0@googlegroups.com>
<5a5c5553-67ad-4f51-ae58-10a1d0aa70f4@googlegroups.com>
<a6dee4c5-4ae9-44be-85e8-12ab2ae13...@k13g2000yqk.googlegroups.com>
Date: Tue, 7 Aug 2012 14:59:15 +0530
Message-ID: <CAKu4Hn0AARgQ65SO7eDBZxMX+9MFU992BVhiHUiTxcEnc=B...@mail.gmail.com>
Subject: Re: [jplatform] Re: GSOC - API to compress and compile Javascript and
CSS - Time for your feed back
From: kavith Thiranga <rc404m...@gmail.com>
To: joomla-dev-platform@googlegroups.com
Content-Type: multipart/alternative; boundary=f46d042fdc1ec030c704c6a9a0c6
--f46d042fdc1ec030c704c6a9a0c6
Content-Type: text/plain; charset=ISO-8859-1
Hi,
> Would it be better to get the mbstring functions out of the actual
> compressors and test it in the upper layer?
I haven't used any mbstring function inside the methods that do the
compressing. But I actually have something in mind about overloading normal
string functions with mbstring functions if user wants it.
Personally, I use UTF-8 encoding for javascripts to include my local
language strings, So it may be good thing to support javascripts which are
multibyte encoded. Otherwise those scripts will be ended up with crappy
strings, after compression.
A solution will be to add a method to js compressor that will change php
ini value ''*mbstring.func_overload*" to 2 (See
http://php.net/manual/en/mbstring.overload.php) whenever user wants to
compress a mb encoded file. May be we can add a compressor option also. I
have just added a method to change mb internal encoding to 8 bit (see
https://github.com/kaviththiranga/joomla-platform/blob/JMedia/libraries/joomla/media/compressor/js.php#L322)
if php mbstrings functions are already enabled and overloading normal
string functions with mbstring functions is also enabled. See the
_changeCharEncoding() method. It actually does nothing to affect the
compression unless user manually configures php.
So I think it will not be an issue.
regarding the name : Yep, my personal idea also was to use JCompress name.
But with the suggestions from community, I decided to use JMedia, thinking
of further improvements(like more compressors) which can be done. But it
must not be the final name. We will see the feedback from others regarding
this and I'll do the modifications if majority suggests that.
regarding the integration of available libraries : Actually the original
idea was to implement 100% joomla-platform library that will handle
compression and combining. So I have tried my best to do that. I have to
mention that this library does not obfuscate javascripts. For those
advanced things, we can integrate an available library. Since I had only a
limited time, I just omitted obfuscating part . But I am hoping to continue
to work on that after GSOC.
Thanks for you feedback.
On Tue, Aug 7, 2012 at 1:31 PM, piotr_cz <pkoniec...@hotmail.com> wrote:
> I don't have experience here, but you could take a look at JString
> package which does some magic in the mbstring area. Or check if
> mbstring is included in PHP 5.2+ (minimum requirement for Platform
> 12.1).
>
> I've been thinking about the name of the package. When I read JMedia,
> multimedia (images, video, sound) come to my mind. I know, js and css
> files are stored in joomla/media folder but maybe something like
> JAssestspacker, JPackager, JMinifier or JCompress (used in your
> implementation plan) would better describe your API package.
>
> In your recent blogpost I haven't found anything about evaluation of
> use with other libraries (YUI compressor, Google closure). If these
> were not possible to integrate, what were the reasons?
>
>
> On Aug 7, 9:37 am, Janich <jan...@gmail.com> wrote:
> > Would it be better to get the mbstring functions out of the actual
> > compressors and test it in the upper layer?
> > I cant really see the solution, but from experience, there are still
> hosts
> > who doesnt have it.
> >
> >
> >
> >
> >
> >
> >
> > On Sunday, 5 August 2012 04:39:52 UTC+2, kavith Thiranga wrote:
> >
> > > Hi,
> >
> > > First of all here<
> https://github.com/kaviththiranga/joomla-platform/tree/JMedia/librari...>is
> the link to media package available in my git hub repo.
> >
> > > And you can read this<
> http://kaviththiranga.blogspot.com/2012/07/gsoc-after-mid-term-evalua...>blog
> post of mine to get a rough idea on how to using this API etc.
> >
> > > I would like to know your feedback soon. I have another 15 days to
> > > suggested pencils down. So I can try for the modifications early.
> Please
> > > refer to above mentioned blog post for more info on using this API.
> >
> > > I am currently working on a plugin to enable this functionality on the
> > > CMS. I hope you will find some time to review this and give me some
> > > feedback.
> >
> > > Thank you.
>
--
Kavith Thiranga Lokuhewage,
Undergraduate,
BSc (Hons) Software Engineering,
Staffordshire University, UK.
--f46d042fdc1ec030c704c6a9a0c6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi,<br><br>> Would it be better to get the mbstring functions out of the=
actual<br>
> compressors and test it in the upper layer?<br><br>I haven't used =
any mbstring function inside the methods that do the compressing. But I act=
ually have something in mind about overloading normal string functions with=
mbstring functions if user wants it.<br>
Personally, I use UTF-8 encoding for javascripts to include my local langua=
ge strings, So it may be good thing to support javascripts which are multib=
yte encoded. Otherwise those scripts will be ended up with crappy strings, =
after compression.<br>
<br>A solution will be to add a method to js compressor that will change ph=
p ini value ''<em>mbstring.func_overload</em>" to 2 (See <a hr=
ef=3D"http://php.net/manual/en/mbstring.overload.php">http://php.net/manual=
/en/mbstring.overload.php</a>) whenever user wants to compress a mb encoded=
file. May be we can add a compressor option also. I have just added a meth=
od to change mb internal encoding to 8 bit (see <a href=3D"https://github.c=
om/kaviththiranga/joomla-platform/blob/JMedia/libraries/joomla/media/compre=
ssor/js.php#L322">https://github.com/kaviththiranga/joomla-platform/blob/JM=
edia/libraries/joomla/media/compressor/js.php#L322</a>) if php mbstrings fu=
nctions are already enabled and overloading normal string functions with mb=
string functions is also enabled. See the _changeCharEncoding() method. It =
actually does nothing to affect the compression unless user manually config=
ures php.<br>
<br>So I think it will not be an issue.<br><br>regarding the name : Yep, my=
personal idea also was to use JCompress name. But with the suggestions fro=
m community, I decided to use JMedia, thinking of further improvements(like=
more compressors) which can be done. But it must not be the final name. We=
will see the feedback from others regarding this and I'll do the modif=
ications if majority suggests that.<br>
<br>regarding the integration of available libraries : Actually the origina=
l idea was to implement 100% joomla-platform library that will handle compr=
ession and combining. So I have tried my best to do that. I have to mention=
that this library does not obfuscate javascripts. For those advanced thing=
s, we can integrate an available library. Since I had only a limited time, =
I just omitted obfuscating part . But I am hoping to continue to work on th=
at after GSOC.<br>
<br>Thanks for you feedback.<br><br><div class=3D"gmail_quote">On Tue, Aug =
7, 2012 at 1:31 PM, piotr_cz <span dir=3D"ltr"><<a href=3D"mailto:pkonie=
c...@hotmail.com" target=3D"_blank">pkoniec...@hotmail.com</a>></span> w=
rote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">I don't have experience here, but you co=
uld take a look at JString<br>
package which does some magic in the mbstring area. Or check if<br>
mbstring is included in PHP 5.2+ (minimum requirement for Platform<br>
12.1).<br>
<br>
I've been thinking about the name of the package. When I read JMedia,<b=
r>
multimedia (images, video, sound) come to my mind. I know, js and css<br>
files are stored in joomla/media folder but maybe something like<br>
JAssestspacker, JPackager, JMinifier or JCompress (used in your<br>
implementation plan) would better describe your API package.<br>
<br>
In your recent blogpost I haven't found anything about evaluation of<br=
>
use with other libraries (YUI compressor, Google closure). If these<br>
were not possible to integrate, what were the reasons?<br>
<div class=3D"im"><br>
<br>
On Aug 7, 9:37=A0am, Janich <<a href=3D"mailto:jan...@gmail.com">jan...@=
gmail.com</a>> wrote:<br>
> Would it be better to get the mbstring functions out of the actual<br>
> compressors and test it in the upper layer?<br>
> I cant really see the solution, but from experience, there are still h=
osts<br>
> who doesnt have it.<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> On Sunday, 5 August 2012 04:39:52 UTC+2, kavith Thiranga wrote:<br>
><br>
> > Hi,<br>
><br>
</div>> > First of all here<<a href=3D"https://github.com/kavithth=
iranga/joomla-platform/tree/JMedia/librari.." target=3D"_blank">https://git=
hub.com/kaviththiranga/joomla-platform/tree/JMedia/librari..</a>.>is the=
link to media package available in my git hub repo.<br>
><br>
> > And you can read this<<a href=3D"http://kaviththiranga.blogspo=
t.com/2012/07/gsoc-after-mid-term-evalua.." target=3D"_blank">http://kavith=
thiranga.blogspot.com/2012/07/gsoc-after-mid-term-evalua..</a>.>blog pos=
t of mine to get a rough idea on how to using this API etc.<br>
<div class=3D"HOEnZb"><div class=3D"h5">><br>
> > I would like to know your feedback soon. I have another 15 days t=
o<br>
> > suggested pencils down. So I can try for the modifications early.=
Please<br>
> > refer to above mentioned blog post for more info on using this AP=
I.<br>
><br>
> > I am currently working on a plugin to enable this functionality o=
n the<br>
> > CMS. I hope you will find some time to review this and give me so=
me<br>
> > feedback.<br>
><br>
> > Thank you.<br>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br><font color=
=3D"#cccccc">Kavith Thiranga Lokuhewage,<br>Undergraduate,<br>BSc (Hons) So=
ftware Engineering,<br>Staffordshire University, UK. <br></font><br>
--f46d042fdc1ec030c704c6a9a0c6--