Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
why do we need jimport?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
D. Dante Lorenso  
View profile  
 More options Jul 20 2012, 9:39 am
From: "D. Dante Lorenso" <da...@lorenso.com>
Date: Fri, 20 Jul 2012 08:39:57 -0500
Local: Fri, Jul 20 2012 9:39 am
Subject: why do we need jimport?
I see this in the Joomla code:

    jimport('joomla.filesystem.folder');
    JFolder :: create(dirname($file));

But with PHP, we can just autoload classes, so why dont we just have
something like this:

   Joomla_Filesystem_Folder :: create(dirname($file));

I don't understand why jimport exists.

-- Dante

D. Dante Lorenso


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Babker  
View profile  
 More options Jul 20 2012, 9:59 am
From: Michael Babker <mbab...@flbab.com>
Date: Fri, 20 Jul 2012 08:59:11 -0500
Local: Fri, Jul 20 2012 9:59 am
Subject: Re: [jgen] why do we need jimport?
It's a leftover from when we couldn't auto load classes.  The Platform now has an auto loader and a lot of classes are loaded that way, but there are some classes that don't follow the auto load convention and still need to be manually imported, and that's where jimport still has some use.

-Michael

Please pardon any errors, this message was sent from my iPhone.

On Jul 20, 2012, at 8:39 AM, "D. Dante Lorenso" <da...@lorenso.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sam Moffatt  
View profile  
 More options Jul 20 2012, 9:59 am
From: Sam Moffatt <pasa...@gmail.com>
Date: Fri, 20 Jul 2012 06:59:51 -0700
Local: Fri, Jul 20 2012 9:59 am
Subject: Re: [jgen] why do we need jimport?
Much of the Joomla Platform was written with support for PHP4 in mind.
Given that PHP5 introduced autoloading, many of the classes and
structures pre-date that functionality. jimport provided a Java
inspired solution for registering files to be loaded in a way that
meant that the system was reasonably flexible.

Increasingly we are shifting to using a camel case based autoloader
for new code however as with any project that has been around for half
a decade and two major PHP versions there is a lot of legacy that
needs to be slowly updated.

Cheers,

Sam Moffatt
http://pasamio.id.au

On Fri, Jul 20, 2012 at 6:39 AM, D. Dante Lorenso <da...@lorenso.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »