Weblocks is an advanced web framework written in Common Lisp.
Currently your web application should depend on :weblocks and :weblocks-prototype-js packages to work. Weblocks PrototypeJs backend
License: Other
Weblocks is an advanced web framework written in Common Lisp.
Currently your web application should depend on :weblocks and :weblocks-prototype-js packages to work. Weblocks PrototypeJs backend
In the last line of the file src/views/formview/template-form-view.lisp, inside (method with-view-header (template-form-view t t t), it uses the variable form-id outside the scope of its binding.
When searching character column with integer value it returns nil
For example, column contains "31159" value
(find-persistent-objects *default-store*
'citilink-excel-data-item
:where [= [article] "31159"])
returns nil
and
(find-persistent-objects *default-store*
'citilink-excel-data-item
:where [= [article] 31159])
returns record
It seems that this is clsql issue
This code works well
(do-page
(make-widget
(lambda (&rest args)
(with-html
(render-link
(lambda (&rest args)
(answer (first (widget-children (root-widget)))))
"back")))))
And this does not
(do-page
(lambda (&rest args)
(with-html
(render-link
(lambda (&rest args)
(answer (first (widget-children (root-widget)))))
"back"))))
The difference is "make-widget"
Currently find-persistent-objects has similar key params like :filter :filter-fn, :where
memory - filter
prevalence - filter
elephant - filter-fn
postmodern - where
clsql - where
I suppose it needs at least to use filter key for elephant.
To make single interface for all stores it needs to make some abstract sub language.
I have such language in git://github.com/html/weblocks-filtering-widget.git but it is not ready to use.
Building with SBCL 2.1.0.29-a1ce59262 / ASDF 3.3.1 for quicklisp dist creation.
Trying to build commit id fe96152
weblocks-demo-popover fails to build because of a failure in weblocks.
weblocks-s11 fails to build because of a failure in weblocks.
weblocks-test fails to build because of a failure in weblocks.
weblocks-yarek fails to build because of a failure in weblocks.
weblocks-yui fails to build because of a failure in weblocks.
weblocks fails to build with the following error:
; caught WARNING:
; Derived type of #:G8 is (MEMBER CHILDREN), conflicting with its asserted type LIST.
; See also:
; The SBCL Manual, Node "Handling of Types"
...
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {100E868433}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "weblocks" "src" "widgets" "widget" "widget">
Commit df17f29 sets the defalt of :affects-dirty-status-p
to nil
, but the documentation of the slot still says that the default is t
. Can you please update this doc?
Thanks!
Daniel
There is custom code in weblocks which shows not found page.
At some point hunchentoot started to show its own not found page.
It needs to be fixed.
Also, it looks like you're going through a horrible bogus and roundabout way to have weblocks-prevalence
depend on weblocks-memory without doing it directly. Can you delete this prepare-prevalence-op nonsense,
and replace it with (1) adding weblocks-memory to :depends-on (2) calling any necessary initialization function
at the correct moment (whether it be compile-time, load-time, runtime or coffee-time).
At this moment when refreshing page with some widgets like gridedit, session becomes bigger. This is because of make-action which generates unique symbol for the same action every time code executes (on each request).
This can by fixed by some actions identification. Each action should have unique id which works across requests.
(make-action (lambda(&rest args)) "some-action-name")
works ok but for internal actions action name should be hard to guess.
Next code should work fine even if we shared application source code. Internal actions will save under same name and name should be hard to guess.
(make-action (lambda(&rest args)) (md5 (format nil "gridedit-render-widget-body-action-1 ~A ~A" (get-universal-time) (random 1000))))
There is a lack in this solution - we should always name actions.
If we could name actions automatically depending on code position it would be great but as I know only sbcl will allow to do this.
Building with SBCL 2.1.7.62-417920f09 / ASDF 3.3.5 for quicklisp dist creation.
Trying to build commit id fe96152
weblocks-demo-popover fails to build because of a failure in weblocks.
weblocks-s11 fails to build because of a failure in weblocks.
weblocks-test fails to build because of a failure in weblocks.
weblocks-yarek fails to build because of a failure in weblocks.
weblocks-yui fails to build because of a failure in weblocks.
weblocks fails to build with the following error:
; caught WARNING:
; Derived type of #:G8 is (MEMBER CHILDREN), conflicting with its asserted type LIST.
; See also:
; The SBCL Manual, Node "Handling of Types"
...
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {1001BF0103}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "weblocks" "src" "widgets" "widget" "widget">
I get a symbol conflict when building weblocks-postmodern:
unhandled NAME-CONFLICT in thread #<SB-THREAD:THREAD "main thread"
RUNNING {10030C1403}>: USE-PACKAGE #<PACKAGE "POSTMODERN"> causes
name-conflicts in #<PACKAGE "WEBLOCKS-POSTMODERN"> between the
following symbols:POSTMODERN:WITH-TRANSACTION,
WEBLOCKS:WITH-TRANSACTION
See also:
The ANSI Standard, Section 11.1.1.2.5
I get this for weblocks-elephant:
unhandled NAME-CONFLICT in thread #<SB-THREAD:THREAD "main thread"
RUNNING {10030C13E3}>: USE-PACKAGE #<PACKAGE "WEBLOCKS"> causes
name-conflicts in #<PACKAGE "WEBLOCKS-ELEPHANT"> between the
following symbols:WEBLOCKS:WITH-TRANSACTION,
ELEPHANT:WITH-TRANSACTION
See also:
The ANSI Standard, Section 11.1.1.2.5
Currently every navigation widget rendered works locally. Its navigation is available while widget is rendered and when we change page navigation becomes unavailable.
For exampe when we have navigation, navigation pane with url "/test" and link to action "a" on this pane which displays page with do-page, when we click on the link and page will be shown, "/test" url will become unavailable.
I suggest to make macro defnavigation which will add navigation to global navigation map.
It would be useful for data views. Currently data views include "Modify" link.
It should be optional.
Integer form fields should have integer validation and write value to record as integer not string.
I'm not sure, if it's a correct place to put it, but trac at:
https://trac.common-lisp.net/cl-weblocks
Can't synchronize with repository:
"Warning: Can't synchronize with repository "(default)" (/project/cl-weblocks/svn does not appear to be a Subversion repository.). Look in the Trac log for more information."
It's shown in a box below navigation links.
Urls like http://weblocks-demo.olexiy.info///// result in pages but should result in not found error.
; caught ERROR:
; READ error during COMPILE-FILE: unmatched close parenthesisLine: 95, Column: 36, File-Position: 4327Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/quicklisp/quicklisp-controller/dist/build-cache/weblocks/dfb3a41d5284e1579966badacab4968a26be99b7/weblocks-20160519-git/src/views/types/presentations/choices.lisp" {10033A7733}>
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {100334F673}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "weblocks" "src" "views" "types" "presentations" "choices">
I get this:
; caught WARNING:
; Use of QUOTE around stepping function in LOOP will be left verbatim.
; current LOOP context: FOR (KEY VALUE) ON CONTEXT :BY (QUOTE CDDR) SUM.
; (LET ((WEBLOCKS-UTIL::NAME (CAR WEBLOCKS-UTIL::TEMPLATE))
; (WEBLOCKS-UTIL::CONTEXT (COPY-TREE (CDR WEBLOCKS-UTIL::TEMPLATE))))
; (OR
; (LOOP WEBLOCKS-UTIL::FOR (WEBLOCKS-UTIL::KEY
; WEBLOCKS-UTIL::VALUE) WEBLOCKS-UTIL::ON WEBLOCKS-UTIL::CONTEXT :BY 'CDDR
; WEBLOCKS-UTIL::SUM (COND (# #) (# #) (# #) (T 0)))
; 0))
;
As a result, weblocks does not build. This is in templates.lisp.
I tried the demo:
CL-USER> (ql:quickload "weblocks-demo")
To load "weblocks-demo":
Load 1 ASDF system:
weblocks-demo
; Loading "weblocks-demo"
CL-USER>(weblocks-demo:start-weblocks-demo)
but I get this error message:
> Please load javascript backend for framework (default is :prototype from https://github.com
> /html/weblocks-prototype-js) and pass :js-backend value (:js-backend :prototype for example)
> into your defwebapp
try:
(weblocks-demo:start-weblocks-demo :js-backend :prototype)
and get the same error.
What I have to do to resolve this problem.
I get this:
; READ error during COMPILE-FILE: Package SWANK does not exist. Line: 40, Column: 50, File-Position: 1512 Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/quicklisp/quicklisp-controller/dist/build-cache/weblocks/e416f64744e54eb0e7cb6e199c09d3b797ea21b3/weblocks-20180123-git/contrib/yarek/examples/employer-employee/src/init-session.lisp" {10026E6763}>
We have :reader
and :writer
parameters which have database item as parameters.
There are much cases where we want not to touch reader and we use :reader only for filtering value. In this case it is better to use :read-filter
and :write-filter
for view field.
For example to save string only in upcase variant we passing :write-filter #'string-upcase
Weblocks should be a component framework but MVC should be used in every weblocks widget since it is comfortably (widget is controller itself).
I suggest to use templates in weblocks.
Template should be piece of code, it should return string or write strings to some stream and shoud not contain complex logic like loops. I've been inspired by mustache approach (http://mustache.github.com/mustache.5.html) which does not use loops in template logic and it looks good, but it would be not a problem to have logic for templates.
We can use functions for templates, in this way we can use many templates backends like cl-who, yaclml, cl-mustache or cl-emb or any other templating library. To use some backend we will need only some glue functions/macros.
And functions are also great for parameters passing (no need in reinventing a bike).
Another question to discuss is should we create some naming convention for views ?
I would like to rewrite weblocks code piece by piece without changing library for html generation (cl-who) but with separating logic from views. As a result templates (views) should add flexibility which weblocks does not have yet and anyone could rewrite widgets look on their needs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.