|
Replies:
75
-
Pages:
6
[
1
2
3
4
5
| Next
]
-
Last Post:
1 Dec 18, 11:28
Last Post By: davidekholm
|
|
|
Posts:
4,224
Registered:
18-Oct-2002
|
|
|
jAlbum 17.1 beta for testing
Posted:
16 Nov 18, 14:27
|
|
|
|
jAlbum 17.1 is underway. Here's a beta for testing.
Changes:
- Introduced Groovy as scripting language. Once compiled, Groovy is faster than BeanShell, but initial textual parsing is far slower than BeanShell. For this reason I currently recommend using BeanShell or compiled Java for user interfaces, but Groovy at least makes Minimal skin process twice as fast (Groovy port of Minimal skin attached). Luckily you can use BeanShell or compiled Java for the UI and another scripting language (Groovy for instance) for the page processing. It's the name of the init file that determines the scripting language to use.
- Completely rewritten skin template parser. Potentially faster as templates are now parsed once to an internal object tree (Abstract Syntax Tree) and from there evaluated to final pages multiple times. The new parser not only caches the internal object tree, it also caches compiled scriptlets for scripting languages supporting this (JavaScript and Groovy. BeanShell doesn't compile well)
- Update image reading library to TwelveMonkeys 3.5 . Problematic CMYK JPEG images should now work again.
I've tested jAlbum's new template parser extensively, but as it is a complete rewrite, there may be bugs left, so please test this jAlbum version against your skins. So far I've only noticed that Chameleon breaks as the new template parser requires the new ${var} syntax for variables. The old $var syntax is from now on ONLY allowed for constants, like $text.textKey. We will release an updated Chameleon that runs on jAlbum 17.1.
The new template parser should be faster as it redoes less work than the old one. Please benchmark against your favorite projects. You should especially benefit from remaking albums with skins that produce separate slide pages.
Groovy support
The new Groovy support is a test. I'll decide later if we're going to keep it, and taking your input on it. It's an alpha release of Groovy 3.0, meaning that it nearly allows 100% of Java's syntax, so moving from BeanShell or plain Java to Groovy should be straight forward. Groovy 3 supports both Java's syntax for array initialization and lambda expressions as well as its own syntax. For other differences please see this page . Being a scripting language, Groovy just like BeanShell, has a syntax for checking the existence of a variable. The syntax is binding.hasVariable("var")
. In BeanShell, the equivalent is like this: var != void
. There is also another important difference that affects skin developers. Creating a typed variable, like this: String author="David"
will create a local variable that is gone when the script is done executing. If you wish to be able to refer to that variable in other scriptlets, simply drop the type, so it becomes like this: author="David"
You will notice that with Groovy, everything is shorter:
- You don't have to add semicolons between statements.
- Printing to the system console is as easy as writing
println "That's cool"
, but you can naturally use ordinary java syntax too:System.out.println("That's cool");
- Setter methods can be called using an "attribute" syntax, so instead of writing:
window.setSize(new Dimension(400,400));
you can write: window.size = new Dimension(400,400)
Those were just some small teasers. Open jAlbum's system console window to play around with Groovy!
Installers:
Windows: http://jalbum.net/download/jAlbum-install.exe
Mac: http://jalbum.net/download/jAlbum.dmg
Other: http://jalbum.net/download/jAlbum.zip
|
|
|
Posts:
7,945
Registered:
31-Jan-2006
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
16 Nov 18, 14:38
in response to: davidekholm
|
|
|
The old $var syntax is from now on ONLY allowed for constants, like $text.textKey.
Just about to head out to deal with 25cm of fresh snow with an icy crust on top, but one quick thought - what about the filters, which still require $var syntax?
|
|
|
Posts:
4,224
Registered:
18-Oct-2002
|
|
|
Posts:
4,224
Registered:
18-Oct-2002
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
16 Nov 18, 15:20
in response to: JeffTucker
|
|
|
The old $var syntax is from now on ONLY allowed for constants, like $text.textKey.
Just about to head out to deal with 25cm of fresh snow with an icy crust on top, but one quick thought - what about the filters, which still require $var syntax?
The filters should be fine. They aren't using the new template parser.
|
|
|
Posts:
4,054
Registered:
4-Aug-2006
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
16 Nov 18, 20:37
in response to: davidekholm
|
|
|
I get an error when running external tools Exception in thread "ScriptingThread" java.lang.NullPointerException
at se.datadosen.jalbum.AlbumBean.processScript(AlbumBean.java:2465)
at se.datadosen.jalbum.JExternalToolsMenu$ToolAction$1.run(JExternalToolsMenu.java:73)
This is with both the 17.1 beta and the update core (17.1B2)
|
|
|
Posts:
4,224
Registered:
18-Oct-2002
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
16 Nov 18, 21:04
in response to: RobM
|
|
|
I get an error when running external tools Exception in thread "ScriptingThread" java.lang.NullPointerException
at se.datadosen.jalbum.AlbumBean.processScript(AlbumBean.java:2465)
at se.datadosen.jalbum.JExternalToolsMenu$ToolAction$1.run(JExternalToolsMenu.java:73)
This is with both the 17.1 beta and the update core (17.1B2)
Thanks for reporting.
|
|
|
Posts:
4,224
Registered:
18-Oct-2002
|
|
|
Posts:
4,054
Registered:
4-Aug-2006
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
16 Nov 18, 22:49
in response to: davidekholm
|
|
|
That nullpointer bug should be fixed in b3 now.
Yes, fixed, I can use the beta core update tool again 
|
|
|
Posts:
4,054
Registered:
4-Aug-2006
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
16 Nov 18, 23:29
in response to: davidekholm
|
|
|
jAlbum 17.1 is underway. Here's a beta for testing.
I've tested jAlbum's new template parser extensively, but as it is a complete rewrite, there may be bugs left, so please test this jAlbum version against your skins. So far I've only noticed that Chameleon breaks as the new template parser requires the new ${var} syntax for variables. The old $var syntax is from now on ONLY allowed for constants, like $text.textKey. We will release an updated Chameleon that runs on jAlbum 17.1.
Tested with my two skins and also a bunch of others such as Hydrogen, MySkin, Fully, Responsive, Blu++ and not had a single error message.
The new template parser should be faster as it redoes less work than the old one. Please benchmark against your favorite projects. You should especially benefit from remaking albums with skins that produce separate slide pages.
I don't have massive projects but the ones I have are processed faster.
|
|
|
Posts:
4,224
Registered:
18-Oct-2002
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
17 Nov 18, 13:02
in response to: RobM
|
|
|
jAlbum 17.1 is underway. Here's a beta for testing.
I've tested jAlbum's new template parser extensively, but as it is a complete rewrite, there may be bugs left, so please test this jAlbum version against your skins. So far I've only noticed that Chameleon breaks as the new template parser requires the new ${var} syntax for variables. The old $var syntax is from now on ONLY allowed for constants, like $text.textKey. We will release an updated Chameleon that runs on jAlbum 17.1.
Tested with my two skins and also a bunch of others such as Hydrogen, MySkin, Fully, Responsive, Blu++ and not had a single error message.
The new template parser should be faster as it redoes less work than the old one. Please benchmark against your favorite projects. You should especially benefit from remaking albums with skins that produce separate slide pages.
I don't have massive projects but the ones I have are processed faster.
Great to hear. Another advantage of the new template parser, apart from being more maintainable, is better error reporting:
- Errors appearing within scriptlets that are part of attribute values now have correct line numbers
- The stack traces of errors could previously grow out of control due to the recursive nature of the old parser. The new parser has clean stack traces that match the tree structure of the elements of the skin pages.
|
|
|
Posts:
4,054
Registered:
4-Aug-2006
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
17 Nov 18, 22:27
in response to: davidekholm
|
|
|
Had a little play with Groovy, using an example straight out of the documentation, I like it, could be a good alternative for writing external tools.
|
|
|
Posts:
7,945
Registered:
31-Jan-2006
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
17 Nov 18, 23:23
in response to: davidekholm
|
|
|
I've tested jAlbum's new template parser extensively, but as it is a complete rewrite, there may be bugs left, so please test this jAlbum version against your skins.
I just rebuilt most of my skin demo albums using 17.1b3 (I've got command scripts set up to launch them, so not a big deal). No failures, not even with the oldest of my skins, at least nothing that's immediately obvious (unlike the Chameleon failure, which was instantly apparent!).
|
|
|
Posts:
2,275
Registered:
14-Dec-2007
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
18 Nov 18, 11:25
in response to: davidekholm
|
|
|
For your information, I remade some of my large folder albums with jAlbum v17 and v17.1b3 on a Windows 10 system and recorded the processing times:
My Frankrijk album made with the Slide Show 4 skin v17: 0:01:36 v17.1b3 0:01:32 (1035MB)
My Algarve album made with the FancyBox skin v17: 0:02:25 v17.1b3: 0:02:24 2nd time: 0:01:53 (2567MB)
In these cases no new images were made I think.
I did also some makes where the output directory was empty at the start:
Pieterpad album made with the PhotoSwipe skin : v17: 0:02:36 v17.1b3: 0:02:33 (241 MB)
Pieterpad album made with Minimal skin v17: 0:01:11 v17.1b3: 0:01:22
Pieterpad album made with MinimalGroovy skin en : v17.1b3: 0:01:19
But there is a problem with the new version:
I have in my skins in index.htt this statement:
<ja:include page="buttons.inc" />
Only the root album contains a file buttons.inc
In version 17 is this file only included in the top album, but in version v17.1b3 it is also included in the folder albums, which is incorrect. See this error in my Algarve album.
Another inconvenience:
If the album is ready, the ready window with the 3 buttons disappears sometimes if the album is ready.
To get it in view you have to click in the Explorer
Edited by: AndreWolff on 18-Nov-2018 11:25
|
|
|
Posts:
7,945
Registered:
31-Jan-2006
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
18 Nov 18, 14:03
in response to: AndreWolff
|
|
|
Only the root album contains a file buttons.inc
Does it work correctly if you are more explicit about the location of that file? <ja:include page="${rootImageDirectory}/buttons.inc" />
|
|
|
Posts:
2,275
Registered:
14-Dec-2007
|
|
|
Re: jAlbum 17.1 beta for testing
Posted:
18 Nov 18, 16:06
in response to: JeffTucker
|
|
|
Does it work correctly if you are more explicit about the location of that file? <ja:include page="${rootImageDirectory}/buttons.inc" />
Possible, but that is not the point:
A new version should be compatibel with the previous version.
And I could have a button.inc file in the root directory and in some folders with a different contents of buttons.inc
It is better that this is corrected once in the jAlbum program instead that it should be corrected in all skins using .inc-files.
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|