I exposed my arguments in several posts here:
http://forum.joomla.org/viewtopic.php?p=1971648#p1971648
and already pointed to the trademark confusion and suggested it a
first time 18 months ago here:
http://forum.joomla.org/viewtopic.php?f=326&t=195747&p=1294048&hilit=jquery#p1294048
On Andrew's suggestion, I'm reposting it here.
More than a legal issue, it's the signal sent to the Joomla community
and the growing confusion with the growing popularity of the
Javascript library of same name that are of concern.
And right now it's quite easy to change, compared to later when
thousands of extensions rely on that class name.
-Joe
> --
>
> You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
> To post to this group, send an email to joomla-...@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>
>
I also support this change, because it's very confusing now. If I remember well, there was a request earlier too from a jQuery developer to make this change. However I would rename it to JDatabaseQuery instead, because the query builder is a sub-part of the database class.
---
Gergo Erdosi
Yes, I remember too that is not the fist time that someone ask for
change it, and even on that moment I guess that no one really endorse
continue using Jquery as a name.
On 21 Dec, 13:26, Gergo Erdosi <ge...@joomline.org> wrote:
> Hi,
>
> I also support this change, because it's very confusing now. If I remember well, there was a request earlier too from a jQuery developer to make this change. However I would rename it to JDatabaseQuery instead, because the query builder is a sub-part of the database class.
>
> ---
> Gergo Erdosi
>
> On 21 Dec 2009, at 15:01, Joseph LeBlanc wrote:
>
> > +1. Although jQuery and JQuery are different things, jQuery and Joomla get used together often enough that "JQuery" is bound to cause considerable confusion.
>
> > -Joe
>
> > On Dec 21, 2009, at 5:38 AM, Beat wrote:
>
> >> I suggest once more to rename Joomla's database class "JQuery" to
> >> "JSql" to avoid further confusion.
>
> >> I exposed my arguments in several posts here:
> >>http://forum.joomla.org/viewtopic.php?p=1971648#p1971648
>
> >> and already pointed to the trademark confusion and suggested it a
> >> first time 18 months ago here:
> >>http://forum.joomla.org/viewtopic.php?f=326&t=195747&p=1294048&hilit=...
>
> >> On Andrew's suggestion, I'm reposting it here.
>
> >> More than a legal issue, it's the signal sent to the Joomla community
> >> and the growing confusion with the growing popularity of the
> >> Javascript library of same name that are of concern.
>
> >> And right now it's quite easy to change, compared to later when
> >> thousands of extensions rely on that class name.
>
> >> --
>
> >> You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
> >> To post to this group, send an email to joomla-...@googlegroups.com.
> >> To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/joomla-dev-cms?hl=en-GB.
Please change it.
It is just going to end up being one of those never ending "Why did
you...?" questions and we have enough of those, thank you very much,
already.
JSQL is short. Or, JDatabaseQuery or JDBQuery or anything except
JQuery, IMO.
It's also a good way to show support and respect for the good work the
jQuery folks are doing.
Thanks Beat for raising the topic.
I vote for renaming, JDatabaseQuery is fine
Robert
Huge benefit for our users to be able to query the forums and wiki and
return
a substantially higher percentage of hits that are on topic. (not to mention
threads in this list archive)
> --
>
> You received this message because you are subscribed to the Google Groups
> "Joomla! CMS Development" group.
> To post to this group, send an email to joomla-...@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-cm...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>
>
>
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.430 / Virus Database: 270.14.116/2579 - Release Date: 12/21/09
07:36:00
The only compelling argument I can see is the ability for Joomla
people to find information cleanly about that particular class, and I
can get behind that if that's the consensus.
Currently a Google search for JSQL yields 106K results. JSql is used
by the Java community (not that I'm worried about that particularly)
and a few other variants are present, we'd out-rank that in a few
days. Most references seem to be old or dead.
WIth context "joomla jsql" has less than 1K results which is quite acceptable.
jquery, by comparison, yields 13+K results and even "joomla jquery" is
over 1.3M which is not trivial.
JDBQuery yields less that 1K results but again is used in Java.
JDatabaseQuery only ranks because we are talking about it ;), but
that's a lot of typing and my fingers aren't getting any younger :P
If it's to change, my preference is for JSQL because it's short and to
the point. I don't mind MongoDB having to be the exception. At the
end of the day it's going to have to translate SQL queries anyway and
in the core at least, JSQL would be used in the SQL building context.
JSQL +1
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/21 Beat <bea...@gmail.com>:
JSQL +1
...but if we want be more generic for the non-SQL DBs:
JDBQuery +1
-Joe
Agree to change the name to JSql to avoid misunderstanding.
Thanks.
Joomlagate
What about "JomQuery" although close to "DomQuery"??
Dan
That would break the existing naming conventions.
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/22 dan1dyoung <dan...@dysolutions.co.uk>:
agree, I already got confused an thought for one moment that JQuery is
related to jQuery js lib.
On 21 Dez., 11:38, Beat <beat...@gmail.com> wrote:
> I suggest once more to rename Joomla's database class "JQuery" to
> "JSql" to avoid further confusion.
>
> I exposed my arguments in several posts here:http://forum.joomla.org/viewtopic.php?p=1971648#p1971648
>
> and already pointed to the trademark confusion and suggested it a
> first time 18 months ago here:http://forum.joomla.org/viewtopic.php?f=326&t=195747&p=1294048&hilit=...
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
Not a big deal.
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/23 dukeofgaming <dukeof...@gmail.com>:
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/23 Ian MacLennan <ian.ma...@joomla.org>:
So we have to remove the magic __toString function of JQuery and
create an
abstract public function queryToString($jquery); in the JDatabase
class
which has to be overriden in JDataBase sub classes.
The setQuery function could become:
public function setQuery($sql, $offset = 0, $limit = 0,
$prefix='#__')
{
if ($sql instanceof JQuery) $sql= $this->queryToString($sql);
$this->_sql = $this->replacePrefix((string)$sql, $prefix);
$this->_limit = (int) $limit;
$this->_offset = (int) $offset;
}
All calls to $db->setQuery((string)$query) have to be replaced by $db-
>setQuery($query)
Of course, some getters have to be implemented in the JQuery class:
getType, getDelete, getSelect, ...
Ch.D
On 22 déc, 22:14, Andrew Eddie <mambob...@gmail.com> wrote:
> If it's not for SQL then you create a new class, JLisp, JMongoLanguage
> or whatever that can also be passed into $db->setQuery();
>
> Not a big deal.
>
> Regards,
> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
>
> 2009/12/23 dukeofgaming <dukeofgam...@gmail.com>:
>
> > ...but, Joomla would get more hits! =P
> > +1
> > And +1 to JDBQuery (I guess we are safe from the java folk, te-he).
> > JSQLQuery sounds nice too but as Ian said, it may not always be for SQL.
>
> > On Tue, Dec 22, 2009 at 3:16 AM, Nabyl <n.beerk...@gmail.com> wrote:
>
> >> +1
> >> And i propose another name :) JSqlQuery sounds to be a good name also.
>
> >> 2009/12/22 ndee <andy.ta...@gmail.com>
$query = $db->getQuery();
$query->...
Sooooo, in that case, the class is probably something like JQueryMySQL.
The MongoDB driver would return JQueryMongoDB.
So, that's probably worth some thought as well if we are serious about
future-proofing this.
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/23 Christophe Demko <chd...@gmail.com>:
In your case, we can keep the magic __toString method which is better.
Ch.D
On 23 déc, 07:02, Andrew Eddie <mambob...@gmail.com> wrote:
> Yeah, that is a good point Christophe. What you actually want to do
> in the JDatabase class is have
>
> $query = $db->getQuery();
> $query->...
>
> Sooooo, in that case, the class is probably something like JQueryMySQL.
>
> The MongoDB driver would return JQueryMongoDB.
>
> So, that's probably worth some thought as well if we are serious about
> future-proofing this.
>
> Regards,
> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
>
> 2009/12/23 Christophe Demko <chde...@gmail.com>:
> >> Andrew Eddiehttp://www.theartofjoomla.com-the art of becoming a Joomla developer
On Dec 21, 4:21 pm, Andrew Eddie <mambob...@gmail.com> wrote:
> Hi Beat.
>
> The only compelling argument I can see is the ability for Joomla
> people to find information cleanly about that particular class, and I
> can get behind that if that's the consensus.
>
> Currently a Google search for JSQL yields 106K results. JSql is used
> by the Java community (not that I'm worried about that particularly)
> and a few other variants are present, we'd out-rank that in a few
> days. Most references seem to be old or dead.
>
> WIth context "joomla jsql" has less than 1K results which is quite acceptable.
>
> jquery, by comparison, yields 13+K results and even "joomla jquery" is
> over 1.3M which is not trivial.
>
> JDBQuery yields less that 1K results but again is used in Java.
>
> JDatabaseQuery only ranks because we are talking about it ;), but
> that's a lot of typing and my fingers aren't getting any younger :P
>
> If it's to change, my preference is for JSQL because it's short and to
> the point. I don't mind MongoDB having to be the exception. At the
> end of the day it's going to have to translate SQL queries anyway and
> in the core at least, JSQL would be used in the SQL building context.
>
> JSQL +1
>
> Regards,
> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
>
> 2009/12/21 Beat <beat...@gmail.com>:
>
> > I suggest once more to rename Joomla's database class "JQuery" to
> > "JSql" to avoid further confusion.
>
> > I exposed my arguments in several posts here:
> >http://forum.joomla.org/viewtopic.php?p=1971648#p1971648
>
> > and already pointed to the trademark confusion and suggested it a
> > first time 18 months ago here:
> >http://forum.joomla.org/viewtopic.php?f=326&t=195747&p=1294048&hilit=...
If we're going to bother with making a name change, then we should be
absolute in the new name being correct - and SQL is most definitely
not correct, as MongoDB is only one of many databases that doesn't do
SQL. This also paves the way for REST interfaces for storage (and not
just CouchDB either) and object databases like Project Voldemort and
memcachedb.
JDBQuery or JDatabaseQuery are certainly more logical and accurate
alternatives to JQuery, IMHO.
-- Mitch
Thanks.
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/24 Mitch Pirtle <mitch....@gmail.com>:
First off, there's a LOT of activity in this space, here's wikipedia's
great entry on just document databases (like MongoDB):
http://en.wikipedia.org/wiki/Document-oriented_database
There are also more traditional key-value stores like MemcacheDB,
Project Voldemort, BigTable...
// MongoDB
See http://www.php.net/manual/en/mongo.tutorial.php
// first, presume we have a collection called "posts", collections are
like tables
$collection = $db->posts;
// to find a blog post titled "first post"
$cursor = $collection->findOne(array("title" => "first post"));
// to get a count of published posts in the category"Australia"
$args = array( "published" => "1", "category" => "Australia");
$count = $collection->find($args);
// Use the same query to get a list (like an objectList)
$cursor = $collection->find($args)
while( $cursor->hasNext() ) {
var_dump( $cursor->getNext() );
}
// CouchDB, HBase
You would have to use REST for these from PHP
E.g. for CouchDB you would create a view, the default URL structure is:
/database/_design/designdocname/_view/viewname
// Redis - I know only how to access by ID
$post = $db->get_by_id( $id );
http://www.ohloh.net/p/php-redis
// Apache Jackrabbit - use Jackalope and Zend java/php bridge
https://fosswiki.liip.ch/display/jackalope/Home
(documentation for PHP incomplete)
Chances are most will either provide a php extension (like MongoDB) or
have a RESTful interface. Either way, you have nothing such as SQL
going on.
Making it possible for us to go this route means you could essentially
hook Joomla into anything, regardless of platform or access methods.
This would be absolutely AWESOME as the impact would be profound. If
we're going to take the time to break independence on MySQL, might as
well go all the way and do it right the first time :-)
-- Mitch
There are two options as I see it:
A) Write queries in native SQL using a query builder class. Oracle,
MSSQL, MongoDB and co translates this into native calls suitable in
conjunction with the driver itself.
This is by far the easiest to implement now and what Christophe and I
have proposed is that you need to return a native query builder object
based on the driver from the JDatabase class. This method *may*
support Joomla running on any database platform but does allow it to
connect to other platforms.
B) Write queries in an abstract query builder that get translated into
SQL or another query language.
This is by far the most complex and intensive because nothing has been
done and has the biggest impact on 3PD's. However, this method does
allow for Joomla to be supported (potentially) on any database
platform.
The question has really turned from "rename JQuery" to "what is the
required architecture, then worry about class names". So, to that
end, what's the architecture we need to allow or option A and possibly
go towards supporting a bit of option B?
Everyone follow what I'm saying?
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/24 Mitch Pirtle <mitch....@gmail.com>:
For J!1.7, I suggest the A) approach:
* have a J(DB|Database|SQL)Query generic class for constructing an
*sql* query.
* have a &getQuery() method in each subclass of JDatabase (actually
JDatabaseMyql and JDatabaseMysqli). This method should return an
unique instance of a subclass of J(DB|Database|SQL)Query (i.e. J(DB|
Database|SQL)QueryMysql for mysql)
* have a reset method in J(DB|Database|SQL)Query for reseting the
query
* have a specialized subclass of J(DB|Database|SQL)Query and J(DB|
Database|SQL)QueryElement in each file located in librairies/joomla/
database/database/*.php
* have a __toString method in each subclass of J(DB|Database|SQL)Query
The classical case would be
$query = &$db->getQuery(); // Get a specialized query (according to
the db handler)
$query->reset(); // Reset the query object
$query->select('*');
$query->from('#__content');
$object = $db->loadObjectList(); // No need to call setQuery since the
query object is unique to the db handler
The cast (string)$query would be done in the query() method of the
JDatabase subclasses
For J!2.0, I suggest the B) approach (a lot of work has to be done)
Ch.D
On 24 déc, 07:07, Andrew Eddie <mambob...@gmail.com> wrote:
> Ok, I think we are confused with the end-goal.
>
> There are two options as I see it:
>
> A) Write queries in native SQL using a query builder class. Oracle,
> MSSQL, MongoDB and co translates this into native calls suitable in
> conjunction with the driver itself.
>
> This is by far the easiest to implement now and what Christophe and I
> have proposed is that you need to return a native query builder object
> based on the driver from the JDatabase class. This method *may*
> support Joomla running on any database platform but does allow it to
> connect to other platforms.
>
> B) Write queries in an abstract query builder that get translated into
> SQL or another query language.
>
> This is by far the most complex and intensive because nothing has been
> done and has the biggest impact on 3PD's. However, this method does
> allow for Joomla to be supported (potentially) on any database
> platform.
>
> The question has really turned from "rename JQuery" to "what is the
> required architecture, then worry about class names". So, to that
> end, what's the architecture we need to allow or option A and possibly
> go towards supporting a bit of option B?
>
> Everyone follow what I'm saying?
>
> Regards,
> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
>
> 2009/12/24 Mitch Pirtle <mitch.pir...@gmail.com>:
>
> > On Wed, Dec 23, 2009 at 6:13 PM, Andrew Eddie <mambob...@gmail.com> wrote:
> >> Mitch, since your the odd man out who is causing all the naming pain
> >> :P can you give us a few examples of non-SQL queries.
>
> > First off, there's a LOT of activity in this space, here's wikipedia's
> > great entry on just document databases (like MongoDB):
>
> >http://en.wikipedia.org/wiki/Document-oriented_database
>
> > There are also more traditional key-value stores like MemcacheDB,
> > Project Voldemort, BigTable...
>
> > // MongoDB
> > Seehttp://www.php.net/manual/en/mongo.tutorial.php
AFAIAC these options are the same, so if it makes folks happy I'm all
for option number one :-)
I think it's a great idea to have a native query builder based on the
driver of the database class.
I'm just saying that if we're going to rename the JQuery class, we
might as well make sure we don't have to rename it again in 12 months.
(Hence the aversion to the word SQL.)
-- Mitch
If you need short names, isn't $this->getQuery(), or JFactory::getDbo
()->getQuery() short enough?
Anyone can see what a JDatabaseQuery class is supposed to do in an
instant.
Don't have these silly names like JDBQuery, JSql, JSQLQuery.
It's an subclass used by JDatabase, so if you think about that, it's
natural to expect the name to be JDatabaseQuery, not some other crazy
stuff ;)
The whole problem is the name being confusing. So it should be a
sensible name that isn't so short you scratch your head when you read
it.
On Dec 23, 7:02 am, Andrew Eddie <mambob...@gmail.com> wrote:
> Yeah, that is a good point Christophe. What you actually want to do
> in the JDatabase class is have
>
> $query = $db->getQuery();
> $query->...
>
> Sooooo, in that case, the class is probably something like JQueryMySQL.
>
> The MongoDB driver would return JQueryMongoDB.
>
> So, that's probably worth some thought as well if we are serious about
> future-proofing this.
>
> Regards,
> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
>
> 2009/12/23 Christophe Demko <chde...@gmail.com>:> In the actual architecture, we can change the name of the class JQuery
> >> Andrew Eddiehttp://www.theartofjoomla.com-the art of becoming a Joomla developer
Erik
> > >> Andrew Eddiehttp://www.theartofjoomla.com-theart of becoming a Joomla developer
So you are saying that the API for the current JQuery is something you
can use for MongoDB if it's able to roll it's own query class?
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/25 Mitch Pirtle <mitch....@gmail.com>:
Last but not least, please remember that we already have a function
getQuery() in JDatabase, which returns the current query. Maybe we
should name it newQuery()?
Hannes
I think as long as it gets the current query, it should be named
getQuery(), as that's what it's doing.
For creating new queries, I think the most OOP way of doing it would
be a setQuery() method, where it'll create a new one if you don't pass
any parameters to it.
So that you could do something like this to create a new and empty
query instance:
$query = $this->setQuery()->getQuery();
To me that feels more OOP :)
> >>>>> Andrew Eddiehttp://www.theartofjoomla.com-theartof becoming a Joomla developer
Hannes
Yup. Note however that takes nothing into account for the core
functionality, which still is inherently tied to relational theory
(joins abound)... So this IMHO is only the first step, but a HUGE one
that puts Joomla in a great position to take advantage of emerging
technologies; and therefore be a viable option for more people.
I think for 1.6 the most we can do is provide multiple named database
connections, and provide a query builder class (my vote is
JDatabaseQuery) that I can offer a MongoDB driver for. That way Joomla
can run in a traditional environment, and also provide support for
those who want to bolt in more modern tech under the hood.
Long term is the issue of relational databases needing joins and SQL,
whereas none of the others do. That's going to be a really fun one to
figure out!
-- Mitch
$newQuery = new $this->getQuery();
PHP is pretty cool that way, when it comes to OOP ;)
> >>>>>>> Andrew Eddiehttp://www.theartofjoomla.com-theartofbecoming a Joomla developer
It would seem the best arguments are to rename JQuery to
JDatabaseQuery and it would seem that the API for this class is
sufficient for the non-SQL-specific engines. In short, there is one
query class to rule them all. If there is only one class, we don't
need to worry about changing the getQuery method at all. The only
limitation to this is you can never have a database engine named
'Query'.
Non-SQL (and non-MySQL) engines can override JDatabase::setQuery to
perform custom parsing of query strings and objects.
That keeps everything pretty simple.
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
I suggest to delay the call to replacePrefix later in the code (when
the query is performed)
public function setQuery($sql, $offset = 0, $limit = 0,
$prefix='#__')
{
$this->_sql = $this->replacePrefix((string)$sql, $prefix); // To be
replaced by $this->_sql = $sql
// add $this->_prefix = $prefix;
$this->_limit = (int) $limit;
$this->_offset = (int) $offset;
return $this;
}
> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2009/12/28 Christophe Demko <chd...@gmail.com>:
From what I understand, it seems that consensus is here to rename.
Any news on this renaming commit into svn before beta ? ;-)
Best Regards,
Beat
http://www.joomlapolis.com/
> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer
2010/1/14 Beat <bea...@gmail.com>:
And that's now done.