#1 Re: mORMot 1 » MVCServer : any 'new user' routine ? only login » 2015-05-26 14:07:49

any idea to create a quick  function to add new user ?

idea is to use  lightweight inline popup code jv   like this
http://www.enthropia.com/labs/ibox/

it will be nice to use the inline popup to show login error codes or any error,  without reload html page

#2 mORMot 1 » MVCServer : any 'new user' routine ? only login » 2015-05-20 13:43:15

delphiancoder
Replies: 2

function TBlogApplication.ArticleComment

require   AuthorID := GetLoggedAuthorID(canComment,comm);
otherwise goto error,

any code ready or almost ready for a new user registration ?

like

function TBlogApplication.SetnewAuthor

thanks for any support and idea

#3 Re: mORMot 1 » MVCServer : /blog path » 2015-05-17 09:17:43

thanks for details explained !
I do some tests now.

so basically  /blog/default   could not became  /blog ?       is an attempt to short url lenght and get is clean

my attempt is also increase the structure add more tables and to something like this:

/blog1
/blog2

or 

/articles
/news
/video

and so on,  or

article.domain.com
video.domain.com
news.domain.com

where any site area is an independent blog where spidered links and extract wil be added with user posting featuers,  like demo already have

#4 Re: mORMot 1 » MVCServer : MVCServerMongoDB Author.ID error » 2015-05-17 09:08:24

Hi,  thanks,

is  MongoDB 3.0.0   2008R2Plus ssl (64bit)

but if due to ver 3  why all ok in creating all DB demo  except the author table that remain void ?  so surprised

#5 mORMot 1 » MVCServer : /blog path » 2015-05-17 04:20:31

delphiancoder
Replies: 9

Hi,

how to simply change the  /blog  path  to a root  /  ?

should be set with these ?

aHTTPServer.RootRedirectToURI
aServer.RootRedirectGet

no  success in replace string  /blog   /blog/default  with /


thanks!!

#6 mORMot 1 » MVCServer : MVCServerMongoDB Author.ID error » 2015-05-17 04:13:09

delphiancoder
Replies: 3

Hi,

running the MVCServer I found out that in the Mongo DB  demo version (only, instead ok with SQLite)

the Author table is empty,  and result in error  at row 350 in MVCViewModel
when the browser  look  to    /blog/AuthorView?id=1

thanks for comments and/or fix !

#7 Re: mORMot 1 » MVCServerMongoDB - Search feature » 2015-03-10 05:59:39

Thanks for your comment.
It will be really useful with the features you mentioned. After all, SQlite3 limits could be how to distribute the database on many servers, and how about performance with concurrent writing (as web, many read and with high traffic many will also write).
Sorry too technical at my level: what mean trigger need to be coded into delphi source ? and you mean FTS information only could be in SQlite3 and all other data in mongo? but just o a single server.
Also I could mirror the FTS information file on more than one server. You think in this way will be more performance than 'all mongo' solution ? I mean using mongo only for search feature.
example in python: https://github.com/ajdavis/motor-blog   demo: http://emptysqua.re/blog/

#8 Re: mORMot 1 » MVC Web App, want to retrieve View files from DB, how? » 2015-03-08 08:51:04

Hi,

during my tests I noted that changing the blog.css  file  (to reduce title and text sizes) nothing changed until kill and run the server runtime again. So I suppose the files are readed on startup and anything stay in ram.  reading from inside the database will add no speed,  I suppose.  Arnaud, is this correct ?

#9 mORMot 1 » MVCServerMongoDB - Search feature » 2015-03-08 08:32:02

delphiancoder
Replies: 3

Hi !

D7 compilation and run is giving me a great experience,  light speed, excellent !

About the 'Search Expression' field on the top of web application,  I see is linked to the function
TBlogApplication.ArticleMatch in the MVCViewModel   module,

how should be works ?  where to look to improve it? or getting work properly ?

my test search  always result in a  'There is no more article corresponding to this research criteria.'

thanks, for any help or suggestion

------------

My little contribution on the demo code, so little more easy to set the IP and Port, in case, like me someone have compiler inside a virtual machine (win XP) and mongo and browser for testing, outside (win 7 x64), on the same machine

added this (on top)


    ServerIP,ServerPort,sServerPort: string;
begin

ServerIP   := '192.168.1.132'; ServerPort := '80';
//ServerIP   := 'localhost';  ServerPort := '8092';

sServerPort:= ':'+ ServerPort; if ServerPort = '80' then sServerPort:='';  //  'hide'  if port 80 on writeln  screen

..
..
      aMongoClient := TMongoClient.Create(ServerIP);
      try
        StaticMongoDBRegisterAll(aServer,aMongoClient.Open('blog'));
        aApplication := TBlogApplication.Create;
        try
          aApplication.Start(aServer);
          aHTTPServer := TSQLHttpServer.Create(ServerPort,aServer,'+',useHttpApiRegisteringURI);
..
..

and modified this:


            writeln('Server launched on port '+ sServerPort +' using ',aHttpServer.HttpServer.ClassName);
            writeln(#10'You can check http://localhost'+ sServerPort +'/blog/mvc-info for information');
            writeln('or point to http://localhost'+ sServerPort +' to access the web app.');

#10 Re: mORMot 1 » MVCServerMongoDB - EXCOS EAccessViolation » 2015-03-06 09:23:26

Thanks a lot !  (I've tried to figure out what the cause, for days, then subscribed here, because supposed others also shouls seen a such problem testing the demo.  Probably not ;-)    )

When you show a fiexed here in the forum,  mean the code  is already updated in the zip:
http://synopse.info/files/mORMotNightlyBuild.zip
or usually is updated at the end of day or next day ?

Thanks

#11 mORMot 1 » MVCServerMongoDB - EXCOS EAccessViolation » 2015-03-06 02:40:03

delphiancoder
Replies: 3

Hi

this is my first post.

Try compilation in D7  as in D2010, ...,   same error,  in mongo 2.6  and mongo 3.0 (both local or remote)

( \Samples\24 - MongoDB  compiled and run no problem ! )

I suppose any mistake on my side, sorry, not seen here any post about this.
Thanks for any help.


.....
.
.
20150306 02230959  +    00096E40 mORMotMongoDB.StaticMongoDBRegister (223)
20150306 02230959 info      TSQLRestStorageMongoDB(00C90B50) will store TSQLArticle using {"TMongoCollection(00B914F8)":{"Name":"Article","FullCollectionName":"blog.Article","Database":{"TMongoDatabase(00B8CE78)":{"Name":"blog","Client":{"TMongoClient(00B7DA08)":{"ConnectionString":"mongodb://188.166.36.128:27017","ServerBuildInfoNumber":3000000,"ReadPreference":"Primary","WriteConcern":"Acknowledged","ConnectionTimeOut":30000,"BytesReceived":1147,"BytesSent":276,"BytesTransmitted":1423,"LogRequestEvent":"SQL","LogReplyEvent":"DB","LogReplyEventMaxSize":1024}}}}}}
20150306 02230959  -    00.000.384
20150306 02230959  +    00096E40 mORMotMongoDB.StaticMongoDBRegister (223)
20150306 02230959 info      TSQLRestStorageMongoDB(00C90E30) will store TSQLComment using {"TMongoCollection(00B91390)":{"Name":"Comment","FullCollectionName":"blog.Comment","Database":{"TMongoDatabase(00B8CE78)":{"Name":"blog","Client":{"TMongoClient(00B7DA08)":{"ConnectionString":"mongodb://188.166.36.128:27017","ServerBuildInfoNumber":3000000,"ReadPreference":"Primary","WriteConcern":"Acknowledged","ConnectionTimeOut":30000,"BytesReceived":1147,"BytesSent":276,"BytesTransmitted":1423,"LogRequestEvent":"SQL","LogReplyEvent":"DB","LogReplyEventMaxSize":1024}}}}}}
20150306 02230959  -    00.000.139
20150306 02230959  +    00096E40 mORMotMongoDB.StaticMongoDBRegister (223)
20150306 02230959 info      TSQLRestStorageMongoDB(00C91110) will store TSQLArticleSearch using {"TMongoCollection(00B91510)":{"Name":"ArticleSearch","FullCollectionName":"blog.ArticleSearch","Database":{"TMongoDatabase(00B8CE78)":{"Name":"blog","Client":{"TMongoClient(00B7DA08)":{"ConnectionString":"mongodb://188.166.36.128:27017","ServerBuildInfoNumber":3000000,"ReadPreference":"Primary","WriteConcern":"Acknowledged","ConnectionTimeOut":30000,"BytesReceived":1147,"BytesSent":276,"BytesTransmitted":1423,"LogRequestEvent":"SQL","LogReplyEvent":"DB","LogReplyEventMaxSize":1024}}}}}}
20150306 02230959  -    00.000.063
20150306 02230959 SQL   TSQLRestStorageMongoDB(00C90870) SELECT RowID,Ident,Occurence FROM Tag order by Ident;20150306 02230959 SQL   {collection:"blog.Tag",opCode:"opQuery",requestID:4,query:{$query:{}},projection:{_id:1,Ident:1,Occurence:1}}
20150306 02230961 DB    null
20150306 02233200 EXCOS EAccessViolation (C0000005) at 000A63CF MVCModel.TSQLTags.Init (283)  stack trace
20150306 02233200  +    TSQLRestServer(00AC79A0).Shutdown
20150306 02233200 info      CurrentRequestCount=0
20150306 02233201  -    00.004.799
20150306 02233201 info  TSQLRestStorageMongoDB.Destroy ->
...
..

Board footer

Powered by FluxBB