Giter Club home page Giter Club logo

treefrogframework / treefrog-framework Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 218.0 38.97 MB

TreeFrog Framework : High-speed C++ MVC Framework for Web Application

Home Page: https://www.treefrogframework.org

License: BSD 3-Clause "New" or "Revised" License

HTML 0.31% QMake 1.27% Shell 0.15% C++ 59.61% C 0.30% Batchfile 0.58% JavaScript 37.31% CMake 0.46%
c-plus-plus cbor cpp cross-platform framework json memcached mongodb mvc mysql orm postgresql redis sql template web webapp webserver websocket

treefrog-framework's People

Contributors

aoym avatar ashcatch avatar dependabot[bot] avatar h4ck3rm1k3 avatar hks2002 avatar hporten avatar karim-en avatar otogawakatsutoshi avatar qlcorp avatar romastyi avatar sanjogrijal avatar shinriyo avatar skipbit avatar synacker avatar thomasgueldner avatar tienvx avatar treefrogframework avatar whitglint avatar zecke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

treefrog-framework's Issues

About Model create

tspawn model user

So in Controller, I write :

eg : It couldn't create a new User in mysql
is it all right?

void register(void)
{
    User user;
    user.setEmail("email");
    user.setActive(0);
    if(!user.create())
        qDebug() << "false";     //always false
    else
        qDebug() << "true";
}

but

User user = User::get("email"):
user.setName("xxx");
user.save();   //it's OK
user.remove(); //it's OK

HTTPS support

Is HTTPS supported or possible to use with treefrog ?

erbpaser tr() scope is not only html innertext.

At present ,tr() scope is html outter html,too many unnessesary tag,attribute in tr() function,
see below:
responsebody += tr(" <style type="text/css">\r\n html, body{\r\n margin:0;padding:0;border:0;width:100%;height:100%;overflow:hidden;\r\n }\r\n .New_Button, .Edit_Button, .Delete_Button, .Update_Button, .Cancel_Button\r\n {\r\n font-size:11px;color:#1B3F91;font-family:Verdana;\r\n margin-right:5px;\r\n }\r\n </style>\r\n

List UtlMenu

\r\n <div class="mini-fit">\r\n <div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" url="/utlMenu/indexJson" pageSize="10">\r\n <div property="columns">\r\n
i feel only text which shown in webpage is better.

Pagination support

Hello Treefrog author

I'm very interesting in Treefrog framework, I decide to use it for my website, but I don't know how to paginate with it. Can you write a simple tutorial for pagination?

strip error

strip C:/TreeFrog/1.12.0/bin/tfenv.bat
strip:C:/TreeFrog/1.12.0/bin/tfenv.bat: File format not recognized
Makefile.Release:4793: recipe for target 'install_script' failed
mingw32-make[1]: [install_script] Error 1 (ignored)

build treefrogframework.org using treefrogframework ;)

How about we build the page using the framework itself.

And maybe the code could be used in examples section or something like that.
I am up to do it. If any CSS guru wants to help.

Tell me what you think about this.

Error Compiling Against Q5 5.5.0

When I try to compile the master branch from the src directory I get "error: unkown type 'QIODevice'. I'm on OSX 10.10.3.

qmake -version

QMake version 3.0 
Using Qt version 5.5.0 in /usr/local/Cellar/qt5/5.5.0-beta/lib

running make from src dir

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -Wall -W -fPIC -DTF_MAKEDLL -DTF_NO_DEBUG -DMONGO_HAVE_STDINT -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -I../include -I../3rdparty/mongo-c-driver/src -I/usr/local/Cellar/qt5/5.5.0-beta/lib/QtSql.framework/Headers -I/usr/local/Cellar/qt5/5.5.0-beta/lib/QtNetwork.framework/Headers -I/usr/local/Cellar/qt5/5.5.0-beta/lib/QtXml.framework/Headers -I/usr/local/Cellar/qt5/5.5.0-beta/lib/QtCore.framework/Headers -I. -I/usr/local/Cellar/qt5/5.5.0-beta/mkspecs/macx-clang -F/usr/local/Cellar/qt5/5.5.0-beta/lib -o tactionthread.o tactionthread.cpp
In file included from tactionthread.cpp:10:
In file included from ../include/TActionThread:1:
In file included from ../include/tactionthread.h:1:
In file included from ../include/../src/tactionthread.h:5:
In file included from ../include/TActionContext:1:
In file included from ../include/tactioncontext.h:1:
../include/../src/tactioncontext.h:39:102: error: unknown type name 'QIODevice'
    qint64 writeResponse(int statusCode, THttpResponseHeader &header, const QByteArray &contentType, QIODevice *body, qint64 length);
                                                                                                     ^
../include/../src/tactioncontext.h:40:55: error: unknown type name 'QIODevice'
    qint64 writeResponse(THttpResponseHeader &header, QIODevice *body, qint64 length);
                                                      ^
../include/../src/tactioncontext.h:42:57: error: unknown type name 'QIODevice'
    virtual qint64 writeResponse(THttpResponseHeader &, QIODevice *) { return 0; }
                                                        ^
In file included from tactionthread.cpp:10:

Issues with mongodb

Im getting the following issues when running a sample app with mongodb:

2013-10-06 16:20:12 INFO  [140735115497856] Qt 4.8.5 / Mac OS X 10.8 Mountain Lion
2013-10-06 16:20:12 INFO  [140735115497856] TreeFrog application servers start up.  port:8800
2013-10-06 16:20:12 INFO  [140735115497856] SQL database available
2013-10-06 16:20:12 INFO  [140735115497856] KVS database available. type:0
2013-10-06 16:20:24 ERROR [4317777920] KVS open error: kvs00_0
2013-10-06 16:20:24 ERROR [4317777920] MongoDB Error: 
2013-10-06 16:20:34 WARN  [4319612928] Reading a socket timed out after 10 seconds. Descriptor:13
2013-10-06 16:20:39 ERROR [4317777920] KVS open error: kvs00_0
2013-10-06 16:20:39 ERROR [4317777920] MongoDB Error: 
2013-10-06 16:21:07 ERROR [4317777920] KVS open error: kvs00_0
2013-10-06 16:21:07 ERROR [4317777920] MongoDB Error: 
2013-10-06 16:21:07 ERROR [4317777920] Aborted at 1381090867 (unix time) try "date -d @1381090867" if you are using GNU date
SIGSEGV (@0x4) received by PID 58131 (TID 0x1015c1000) stack trace:
PC: @        0x100081d87  bson_iterator_more
    @     0x7fff864dc90a  _sigtramp
    @        0x100081d88  bson_iterator_more
    @        0x10007b675  TBson::fromBson()
    @        0x1000771ff  TMongoDriver::getLastCommandStatus()
    @        0x100079cb7  TMongoQuery::insert()
    @        0x10007d41e  TMongoObject::create()
    @        0x1017866ca  Comments::create()
    @        0x1015cac8a  CommentsController::create()
    @        0x1015cfc66  CommentsController::qt_static_metacall()
    @        0x100250386  QMetaMethod::invoke()
    @        0x100015747  TDispatcher<>::invoke()
    @        0x1000195d8  TActionContext::execute()
    @        0x10001dffc  TActionThread::run()
    @        0x100170918  QThreadPrivate::start()
    @     0x7fff864ee772  _pthread_start

2013-10-06 16:21:07 ERROR [140735115497856] tfserver error detected(1). [/usr/bin/tadpole]
2013-10-06 16:21:07 INFO  [140735115497856] SQL database available
2013-10-06 16:21:07 INFO  [140735115497856] KVS database available. type:0

and this is the output for tspawn --show-collections

DatabaseName: test
HostName:     localhost
MongoDB opened successfully
-----------------
Existing collections:
  Comments
  Users
  system.indexes

Create a branch structure for easing development.

Hellos Guys,

I consider the project needs a development branch, with that it can ease up a little the merge of pull requests into a development branch.

At the time there is a recent, discussion in the ML.

Fix compilation with Qt 5.1 (remove deprecated Q_GLOBAL_STATIC_WITH_INITIALIZER)

Using Qt 5.1.0/gcc_64 on Fedora 19, I had to change all Q_GLOBAL_STATIC_WITH_INITIALIZERs to something like the following codes (for MethodHash inside thttprequest.cpp_) so version 1.6.1 of the codes could be compiled.

MethodHash* methodHash()
{
    static MethodHash* x;
    if (!x)
    {
        x = new MethodHash;
        x->insert("get",     Tf::Get);
        x->insert("head",    Tf::Head);
        x->insert("post",    Tf::Post);
        x->insert("options", Tf::Options);
        x->insert("put",     Tf::Put);
        x->insert("delete",  Tf::Delete);
        x->insert("trace",   Tf::Trace);
}
return x;
}

loading js file take long times

I am strange why my view css type file(90KB) loading take 10ms, but js type file(90KB) need many times the css file. such as jquery.js, it need 10s.

TSqlORMapper::selectStatement() returns empty select string in Qt 5.1.0

selectStatement() of the TSqlORMapper returns empty string (Filters and OrderBy strings are okay). It seems to be caused by calling QString query = QSqlTableModel::selectStatement(); which returns empty string in TreeFrog 1.7 and Qt 5.1.0.

Here is the code to reproduce the bug:

TCriteria crt(UserObject::Username, username);
crt.add(UserObject::Password, password);

TSqlORMapper<UserObject> mapper;

UserObject obj = mapper.findFirst(crt);

tDebug("Last Error: %s", mapper.lastError().text().toStdString().c_str());

Which logs the following text:

2013-07-24 14:39:00  [139719046817536] [BEGIN] [databaseId:0]
2013-07-24 14:39:00  [139719046817536]  WHERE "username"='morteza' AND "password"='password' LIMIT 1
2013-07-24 14:39:00  [139719046817536] near "WHERE": syntax error Unable to execute statement
2013-07-24 14:39:00  [139719046817536] [COMMIT] [databaseId:0]

Building example issue

Hello,
After I had installed the last version from Github, I tried to build the blog example according to the Tutorial and here is the output I got:
Undefined symbols for architecture x86_64:
"QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)", referenced from: QTypedArrayData<unsigned short>::deallocate(QArrayData*) in blog.o QTypedArrayData<char>::deallocate(QArrayData*) in blog.o QTypedArrayData<unsigned short>::deallocate(QArrayData*) in moc_blogobject.o "QArrayData::shared_null", referenced from: QArrayData::sharedNull() in blog.o "QJsonArray::append(QJsonValue const&)", referenced from: Blog::getAllJson() in blog.o "QJsonArray::QJsonArray()", referenced from: Blog::getAllJson() in blog.o "QJsonArray::~QJsonArray()", referenced from: Blog::getAllJson() in blog.o "QJsonValue::QJsonValue(QJsonObject const&)", referenced from: Blog::getAllJson() in blog.o "QJsonValue::~QJsonValue()", referenced from: Blog::getAllJson() in blog.o "QJsonObject::fromVariantMap(QMap<QString, QVariant> const&)", referenced from: Blog::getAllJson() in blog.o "QJsonObject::~QJsonObject()", referenced from: Blog::getAllJson() in blog.o "QMapDataBase::freeData(QMapDataBase*)", referenced from: QMapData<QString, QVariant>::destroy() in blog.o "QMapDataBase::freeTree(QMapNodeBase*, int)", referenced from: QMapData<QString, QVariant>::destroy() in blog.o "QAbstractItemModel::moveColumns(QModelIndex const&, int, int, QModelIndex const&, int)", referenced from: vtable for TSqlORMapper<BlogObject> in blog.o "QAbstractItemModel::moveRows(QModelIndex const&, int, int, QModelIndex const&, int)", referenced from: vtable for TSqlORMapper<BlogObject> in blog.o "QObject::connectNotify(QMetaMethod const&)", referenced from: vtable for TSqlORMapper<BlogObject> in blog.o vtable for BlogObject in moc_blogobject.o "QObject::disconnectNotify(QMetaMethod const&)", referenced from: vtable for TSqlORMapper<BlogObject> in blog.o vtable for BlogObject in moc_blogobject.o "QString::fromUtf8_helper(char const*, int)", referenced from: QString::fromUtf8(char const*, int) in blog.o "QString::append(QLatin1String)", referenced from: TSqlORMapper<BlogObject>::selectStatement() const in blog.o TSqlORMapper<BlogObject>::orderBy() const in blog.o "QListData::dispose(QListData::Data*)", referenced from: QList<QVariant>::QList(QList<QVariant> const&)::Cleanup::~Cleanup() in blog.o QListData::dispose() in blog.o QList<QVariant>::dealloc(QListData::Data*) in blog.o QList<Blog>::dealloc(QListData::Data*) in blog.o "QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void const*), void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*)", referenced from: int qRegisterNormalizedMetaType<TCriteria>(QByteArray const&, TCriteria*, QtPrivate::MetaTypeDefinedHelper<TCriteria, (QMetaTypeId2<TCriteria>::Defined) && (!(QMetaTypeId2<TCriteria>::IsBuiltIn))>::DefinedType) in blog.o int qRegisterNormalizedMetaType<TCriteriaData>(QByteArray const&, TCriteriaData*, QtPrivate::MetaTypeDefinedHelper<TCriteriaData, (QMetaTypeId2<TCriteriaData>::Defined) && (!(QMetaTypeId2<TCriteriaData>::IsBuiltIn))>::DefinedType) in blog.o "QMetaType::registerNormalizedTypedef(QByteArray const&, int)", referenced from: int qRegisterNormalizedMetaType<TCriteria>(QByteArray const&, TCriteria*, QtPrivate::MetaTypeDefinedHelper<TCriteria, (QMetaTypeId2<TCriteria>::Defined) && (!(QMetaTypeId2<TCriteria>::IsBuiltIn))>::DefinedType) in blog.o int qRegisterNormalizedMetaType<TCriteriaData>(QByteArray const&, TCriteriaData*, QtPrivate::MetaTypeDefinedHelper<TCriteriaData, (QMetaTypeId2<TCriteriaData>::Defined) && (!(QMetaTypeId2<TCriteriaData>::IsBuiltIn))>::DefinedType) in blog.o "QObjectData::dynamicMetaObject() const", referenced from: BlogObject::metaObject() const in moc_blogobject.o "QAbstractItemModel::canDropMimeData(QMimeData const*, Qt::DropAction, int, int, QModelIndex const&) const", referenced from: vtable for TSqlORMapper<BlogObject> in blog.o "QAbstractItemModel::sibling(int, int, QModelIndex const&) const", referenced from: vtable for TSqlORMapper<BlogObject> in blog.o "QString::arg(QString const&, int, QChar) const", referenced from: TCriteriaConverter<BlogObject>::criteriaToString(QVariant const&, QSqlDatabase const&) in blog.o TCriteriaConverter<BlogObject>::criteriaToString(QString const&, TSql::ComparisonOperator, TSql::ComparisonOperator, QVariant const&, QSqlDatabase const&) in blog.o "QVariant::canConvert(int) const", referenced from: bool QVariant::canConvert<TCriteria>() const in blog.o bool QVariant::canConvert<TCriteriaData>() const in blog.o "QVariant::convert(int, void*) const", referenced from: QtPrivate::QVariantValueHelper<TCriteriaData>::metaType(QVariant const&) in blog.o QtPrivate::QVariantValueHelper<TCriteria>::metaType(QVariant const&) in blog.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [../lib/libmodel.1.0.0.dylib] Error 1 make: *** [sub-models-make_first] Error 2

There are obviously some issues about class that needs a virtual member, but there also some issues I could not fix as for example I changed the header for json modules and still got errors.

I would also recommend to add
macx { QMAKE_LFLAGS += -F/Library/Frameworks/ LIBS += -framework treefrog } the appbase.pri in order for make to find the framework on OS X.

Best,
Ben Le Cam.

Foreign key

Lack of documentation for foreign key. Also queries for foreign keys please. Thanks :)

Can't compile using a spaced path

Trying to execute ./configure in a path like "/home/user/Proyectos C++/treefrog/" leads to not finding mongo-c-driver.pro.
Changing the path to a nonspace one makes ./configure work perfectly.

Unable to make & make install tools

Configured like this:
./configure --framework=/path/that/doesn't/need/root/privileges
cd src
make; make install (this was fine)
cd ../tools
make; make install
Got this error:
ld: warning: directory not found for option '-L/opt/X11/lib'
Matthews-MacBook-Pro:tools matthew$ make install
cd tfmanager/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
cp -f "treefrog" "/usr/bin/treefrog"
cp: /usr/bin/treefrog: Permission denied
make[1]: [install_target] Error 1 (ignored)
cd tfserver/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
cp -f "tadpole" "/usr/bin/tadpole"
cp: /usr/bin/tadpole: Permission denied
make[1]: [install_target] Error 1 (ignored)
cd tmake/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
cp -f "tmake" "/usr/bin/tmake"
cp: /usr/bin/tmake: Permission denied
make[1]: [install_target] Error 1 (ignored)
cd tspawn/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
cp -f "tspawn" "/usr/bin/tspawn"
cp: /usr/bin/tspawn: Permission denied
make[1]: [install_target] Error 1 (ignored)
mkdir: /usr/share/treefrog/defaults/: Permission denied
make[1]: *** [install_defaults] Error 1
make: *** [sub-tspawn-install_subtargets] Error 2

treefog binary does not execute. I will not run the install with sudo privileges, as I do not really know what this application does.

Redirect Debug output to console.

Hey TF people,
This is more like a feature request, when you start a app with the treefrog -d -e
the Log output could be showed in the console for debug and information purposes.

Not compiling in Ubuntu 14.04

Hello,
I'm trying to build thefrog in a clean Ubuntu 10.04 installation but I get the same results either by using the tar.gz or cloning the repo.

The ./configure goes just fine:

root@ubuntu:~/treefrog-framework#
root@ubuntu:~/treefrog-framework# ./configure
Reading /root/treefrog-framework/tools/tfmanager/tfmanager.pro
Reading /root/treefrog-framework/tools/tfserver/tfserver.pro
Reading /root/treefrog-framework/tools/tmake/tmake.pro
Reading /root/treefrog-framework/tools/tspawn/tspawn.pro
cd tfmanager/ && /usr/lib/x86_64-linux-gnu/qt4/bin/qmake /root/treefrog-framework/tools/tfmanager/tfmanager.pro -spec /usr/share/qt4/mkspecs/linux-g++ CONFIG+=x86_64 CONFIG+=release target.path=/usr/bin header.path=/usr/include/treefrog datadir=/usr/share/treefrog lib.pat
h=/usr/lib -o Makefile
cd tfserver/ && /usr/lib/x86_64-linux-gnu/qt4/bin/qmake /root/treefrog-framework/tools/tfserver/tfserver.pro -spec /usr/share/qt4/mkspecs/linux-g++ CONFIG+=x86_64 CONFIG+=release target.path=/usr/bin header.path=/usr/include/treefrog datadir=/usr/share/treefrog lib.path=/
usr/lib -o Makefile
cd tmake/ && /usr/lib/x86_64-linux-gnu/qt4/bin/qmake /root/treefrog-framework/tools/tmake/tmake.pro -spec /usr/share/qt4/mkspecs/linux-g++ CONFIG+=x86_64 CONFIG+=release target.path=/usr/bin header.path=/usr/include/treefrog datadir=/usr/share/treefrog lib.path=/usr/lib -
o Makefile
cd tspawn/ && /usr/lib/x86_64-linux-gnu/qt4/bin/qmake /root/treefrog-framework/tools/tspawn/tspawn.pro -spec /usr/share/qt4/mkspecs/linux-g++ CONFIG+=x86_64 CONFIG+=release target.path=/usr/bin header.path=/usr/include/treefrog datadir=/usr/share/treefrog lib.path=/usr/li
b -o Makefile

Compiling MongoDB driver library ... OK

First, run "make" and "sudo make install" in src directory.
Next, run "make" and "sudo make install" in tools directory.

But the first "make" in the src dir is failing.

root@ubuntu:~/treefrog-framework# cd src
root@ubuntu:~/treefrog-framework/src# make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DTF_MAKEDLL -DTF_NO_DEBUG -DMONGO_HAVE_STDINT -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/
qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I../include -I../3rdparty/mongo-c-driver/src -I. -o twebapplication.o twebapplication.cpp
twebapplication.cpp:8:16: fatal error: QDir: No such file or directory
 #include <QDir>
                ^
compilation terminated.
make: *** [twebapplication.o] Error 1

Could you please give me a hand on this ?

TViewHelper Class add jsTag function

There is a styleSheetTag() already, but there is no jsTag().
Most times, we need write js tag. such as <script src="js/jquery-1.6.2.min.js" type="text/javascript"></script>in the .

tspawn new not generating any ini files @master

Hello!

master= afc9224
Just compiled the master binary under MacOS X and Linux as well.
tpsawn new does not generate almost any files, only the directory structure.

any other consequent action fails due to missing ini files.
This works fine on 1.7.5

akos@akos-VirtualBox:~$ tspawn n blogapp2
  created   blogapp2
  created   blogapp2/controllers
  created   blogapp2/models
  created   blogapp2/models/sqlobjects
  created   blogapp2/models/mongoobjects
  created   blogapp2/views
  created   blogapp2/views/layouts
  created   blogapp2/views/mailer
  created   blogapp2/views/partial
  created   blogapp2/views/_src
  created   blogapp2/helpers
  created   blogapp2/config
  created   blogapp2/config/environments
  created   blogapp2/config/initializers
  created   blogapp2/public
  created   blogapp2/public/images
  created   blogapp2/public/js
  created   blogapp2/public/css
  created   blogapp2/db
  created   blogapp2/lib
  created   blogapp2/log
  created   blogapp2/plugin
  created   blogapp2/script
  created   blogapp2/sql
  created   blogapp2/test
  created   blogapp2/tmp
  created   blogapp2/blogapp2.pro

error: [source.list] Error 2 when build in Qtcreator

It is ok in DOS command,
i review the folder/files, find Makefile.Release content:

DIST = tasktask_editView.moc
tasktask_entryView.moc
tasktask_indexView.moc
tasktask_showView.moc tasktask_editView.cpp
tasktask_entryView.cpp
tasktask_indexView.cpp
tasktask_showView.cpp

but all generated moc files in _src/release folder.

Add a proper Forum Page.

After a bit of using of this awesome framework, there is actually (that i know) to place a question about the usage of the framework, problems and things like that.

That is really needed for tools used by a lot of people. I guess a proper forum page will do it.

upsert support

Hello! PosgreSQL 9.5+ supports UPSERT. Can it be used in Treefrog internally? If not, what analog can be used instead (without using raw SQL directly)?

About the ORM.

Is there a separate repository where I can download only the ORM feature?

about TRedis

I found that's in controller . eg
void register(void)
{
TRedis redis;
if(!redis.isOpen())
return;
if(!redis.set("123","456"))
return;
.......
}
question:

  1. That is instantiated in the function of writing is correct?
    if need to reconnect Redis every time?
  2. If it's correct. I test, Sometimes, it will make TRedis Server to shutdown.
    But I use Flask to test Redis, it's ok.

need new function variableNameToFieldName in TAbstractModel

currently, TAbstractModel class has a function fieldNameToVariableName, the database field can convert to variablename,
but if i want to set sort field, the TSqlORMapper class function void setSortOrder(int column, Tf::SortOrder order) only support int, not support the variablename. i can't derectly set the variablename as the sort field.
Mostly, the sort field name is generated from the web ui (table or grid) by user, and send the sort field name by httprequest. So, i think this function is very necessary.

tspawn execute error

I have Fedora 20 dist.
I succefully compiled treefrog, but after run tspaw recieved next error:
"error while loading shared libraries: libtreefrog.so.1: cannot open shared object file: No such file or directory"

about set QTENV

when install treefrog_.exe file, it will search QT, and maybe to detect "qtenv2.bat"
in order to set QTENV="...\bin\qtenv2.bat"
So if you install _msys2* , because it's Qt don't include qtenv2.bat. so couldn't install treefrog*.exe

Patch: Mail add SSL Mode

compare to: *Latest commit e3d01b1 * (2016-6-16)

application.ini
add
#0= TCP, 1= SSL

ActionMailer.smtp.Mode=1

tfnamespace.h
add
line183:

ActionMailerSmtpMode,

tappsettings.cpp
add
line67:

insert(Tf::ActionMailerSmtpMode, "ActionMailer.smtp.Mode");

tsmtpmailer.h
add

public:
    enum ConnectionType
    {
        TcpConnection=0,
        SslConnection=1,
        TlsConnection=2       // STARTTLS
    };

private:
    ConnectionType connectionType;

line27:
add

void setSmtpMode(int type);

tsmtpmailer.cpp

line35:
change:

TSmtpMailer::TSmtpMailer(QObject *parent)
    : QObject(parent), smtpPort(0), authEnable(false), pop(0)
{ }

change:

TSmtpMailer::TSmtpMailer(const QString &hostName, quint16 port, QObject *parent)
    : QObject(parent), smtpHostName(hostName), smtpPort(port),
      authEnable(false), pop(0)
{ }

add:

void TSmtpMailer::setSmtpMode(int type)
{
    if(type == (int)ConnectionType::TcpConnection) //tcp
    {
        connectionType = ConnectionType::TcpConnection;
        socket = new QTcpSocket;
    }
    else if(type == (int)ConnectionType::SslConnection)
    {
        connectionType = ConnectionType::SslConnection;
        socket = new QSslSocket;
    }
    else if(type == (int)ConnectionType::TlsConnection)
    {
        connectionType = ConnectionType::TlsConnection;
        socket = new QSslSocket;
    }
}

change:

bool TSmtpMailer::connectToHost(const QString &hostName, quint16 port)
{
//comment
//  socket->connectToHost(hostName, port);
//add
    switch (connectionType)
    {
    case TlsConnection:
    case TcpConnection:
        socket->connectToHost(hostName, port);
        break;
    case SslConnection:
        ((QSslSocket*) socket)->connectToHostEncrypted(hostName, port);
        break;
    }


    if (!socket->waitForConnected(5000)) {
        tSystemError("SMTP server connect error: %s", qPrintable(socket->errorString()));
        return false;
    }
    return (read() == 220);
}

tactionmailer.cpp
line77:
add

        mailer->setSmtpMode(Tf::appSettings()->value(Tf::ActionMailerSmtpMode).toUInt()));

treefrog maybe add help

I try treefrog --help, but nothing.
so I search source code:
found:
insert("-e", EnvironmentSpecified);
insert("-s", SocketSpecified);
insert("-v", PrintVersion);
insert("-h", PrintUsage);
insert("-l", ShowRunningAppList);
insert("-d", DaemonMode);
insert("-w", WindowsServiceMode);
insert("-k", SendSignal);
insert("-r", AutoReload);

and some argv send to TWebApplication eg. -i -e and webRootAbsolutePath
maybe you can add the help command.

Access appSettings from TActionControllers

Hellos Gentlemen,

I was digging in the source code for a way to access the application settings from a controller and there is actually no way to access the already loaded ones in TWebApplication. Which i guess are the ones in application.ini.

I think it will be handy to access the quickly. I still don't know how the framework handle the dispatch of these controllers, to write this code will take too much time (I am willing to do it if anyone give me a hint where to do it ;) ).

not support windows XP

I found that's mongo-c-driver. not support XP. so TreeFrog couldn't run.

https://github.com/mongodb/libbson (Windows Vista, 7, 8)
\3rdparty\mongo-c-driver\src\libbson\src\bson\bson-thread-private.h

define bson_once(o, c) InitOnceExecuteOnce(o, c, NULL, NULL)

windows xp kernel32.dll didn't include InitOnceExecuteOnce function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.