Recent

Author Topic: Suggestions for Lazarus web site  (Read 147809 times)

Nebula

  • Jr. Member
  • **
  • Posts: 88
Re: Suggestions for Lazarus web site
« Reply #30 on: April 01, 2013, 11:33:57 am »
I usually visit the wikipedia page first, for anything I'm looking up, before a project's homepage (because it's easier to get a quick summary of what it's all about before possibly being bamboozled by some random design I'll have to figure out)...

After 5 hours of hard work I have created a
live mockup of Lazarus Homepage.

http://adnan.freevar.com/online/lazarus/

... but wow, that's pretty good! Well done  :D
Newbie testing Lazarus v1.0 - very impressed
Win 7 at work, XP and Linux Mint at home.
It all started with a ZX80 on a b/w telly........
Code: [Select]
Uses Smiles, GoodHumour, WantsToHelp;
{ never liked C - curly brackets are for comments! }

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3646
  • I like bugs.
Re: Suggestions for Lazarus web site
« Reply #31 on: April 01, 2013, 11:56:03 am »
PHP is for making it easier to (1) add pages, (2) edit them and (3) to have a better control of the layout.
...
Plus, if I use static HTML then you will have to add every announcement by hand. But with this system, you just need to post in the "Team" board and it will be automatically be listed with a small summary in the homepage.

No. Please read what marcov wrote here:
  http://www.lazarus.freepascal.org/index.php/topic,20388.msg117881.html#msg117881
Dynamic contents can as well come from files which are generated somehow or edited by hand and stored in SVN.

Sections of HTML pages can be included using JavaScript. I don't see why server side programming would be needed for that. (?)
I may be wrong of course, I don't do web pages much myself.

I am sticking to this detail because it may make a big difference for the page maintenance, depending on server access rights and other issues.

Juha
« Last Edit: April 01, 2013, 12:13:57 pm by JuhaManninen »

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: Suggestions for Lazarus web site
« Reply #32 on: April 01, 2013, 12:07:00 pm »
PHP is for making it easier to (1) add pages, (2) edit them and (3) to have a better control of the layout. Think about an HTML static 5-page homepage (with the features, downloads, about etc. pages),  and after 6 months you need to change the top navigation links or change the Lazarus logo size. would you edit all the five pages? It will be more inappropriate when you will have more pages with the details, e.g. of major features or some comparison between different IDEs etc. You could have 25 pages running! It will be almost impossible and illogical to maintain.

But with this software/cms you will have to add a file for the new page and that's it. You can use the file right away! And editing the layout is easier, because I have used html files for layout template. Although it runs on php, the layout is "compiled" (yes compiled) using the html file's layout. (Not a line of php is needed to be written.) So it is easier to change. (Further details I will provide it in private due to security reasons.)

Plus, if I use static HTML then you will have to add every announcement by hand. But with this system, you just need to post in the "Team" board and it will be automatically be listed with a small summary in the homepage.

Initially, I was opposed to a possible solution using Pascal for the website, as I thought that the time would be better invested in the continued development of Lazarus and Free Pascal. But in the meanwhile I was convinced that we have already the required technology at hand.

Marcov wrote in the thread calling for a webmaster:

  It is better that you use php or any dynamic languages to automate tasks that need maintaining.

Commonly thought, and totally wrong. Why? Three  reasons:

- static html is more easily mirrored.
- FPC does not use hosted sites with only minimal serverside options (like preinstalled LAMP), but own servers. Running e.g. FPC programs in cronjobs is thus not a problem
- Any FPC/Lazarus devel can operate and maintain a pascal template expander that expands a markdown/XML or whatever version of the news to a new
    static page. As a devel, he is also supposed to be able to add something to a html or XML document.  Not all can handle PHP, and while more than one can do some PHP,
    that is something else from knowing the exact version and set of pkgs on the server.

Quote
For example, announcements, forum popular posts etc. With dynamic you can almost forget about maintaining the website, except for design improvements.

With a setup as e.g. the FPC site, you can simply add the news to some file in SVN, and the rest goes automatically.

This is quite persuasive. Moreover, the Brook framework seems to continually mature, see http://www.lazarus.freepascal.org/index.php?topic=19225 .

Therefore, I consider the planned re-design to be a unique chance to use Free Pascal as a dynamic back-end of the new front page and to demonstrate its usefulness also for web applications.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3646
  • I like bugs.
Re: Suggestions for Lazarus web site
« Reply #33 on: April 01, 2013, 12:39:15 pm »
This is quite persuasive. Moreover, the Brook framework seems to continually mature, see http://www.lazarus.freepascal.org/index.php?topic=19225 .

Marcov was writing about web pages in general, not specifically about the new Lazarus main page which IMO does not require server side programming at all, or it may require only simple FPC programs in cronjobs to generate files.

Quote
Therefore, I consider the planned re-design to be a unique chance to use Free Pascal as a dynamic back-end of the new front page and to demonstrate its usefulness also for web applications.

Again, what do you want to do with it? Then main page? Or the forum?
Implementing the forum with Pascal SW is a nice idea but let's not mix it with the main page layout design. They are 2 very different things.

Reimplementing the whole forum requires lots of work. If you have enough time, energy, motivation and skill to do it, great, go ahead building a prototype including a forum history import feature.
nsunny has created a prototype of the page he suggested, you can do the same with forum.
You can use your own virtual machine or PC to start with.

I want to get this web page implemented. I still have not got answers from admins. I hope this is not turning into a political issue...

Juha

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: Suggestions for Lazarus web site
« Reply #34 on: April 01, 2013, 12:48:22 pm »
Marcov was writing about web pages in general, not specifically about the new Lazarus main page which IMO does not require server side programming at all, or it may require only simple FPC programs in cronjobs to generate files.

OK, cronjobs might do the job. Some elements of the new homepage like the presentation of the random project or automatic detection of the visitor's operating system might, however, as well profit from a Free Pascal backend.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3646
  • I like bugs.
Re: Suggestions for Lazarus web site
« Reply #35 on: April 01, 2013, 01:47:31 pm »
But with this software/cms you will have to add a file for the new page and that's it. You can use the file right away! And editing the layout is easier, because I have used html files for layout template. Although it runs on php, the layout is "compiled" (yes compiled) using the html file's layout. (Not a line of php is needed to be written.) So it is easier to change. (Further details I will provide it in private due to security reasons.)

What are the "security reasons"?
The page sources must be public. Security must be obtained by other means.

I didn't quite understand the compiled HTML thing. HTML does not need to be compiled.

Juha

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3646
  • I like bugs.
Re: Suggestions for Lazarus web site
« Reply #36 on: April 01, 2013, 02:05:32 pm »
OK, cronjobs might do the job. Some elements of the new homepage like the presentation of the random project or automatic detection of the visitor's operating system might, however, as well profit from a Free Pascal backend.

Maybe. I am not against Free Pascal backends or anything.
Now I am mostly worried about the administrative issues of the web plan, and the co-operation it requires.
It requires more effort than for example patches for Lazarus sources do.

Juha

Fred vS

  • Hero Member
  • *****
  • Posts: 1675
    • miXimum is the DJ's best friend
Re: Suggestions for Lazarus web site
« Reply #37 on: April 01, 2013, 02:11:11 pm »
Quote
  Therefore, I consider the planned re-design to be a unique chance to use Free Pascal as a dynamic back-end of the new front page and to demonstrate its usefulness also for web applications.

I totally agree and Silvio, with his Brook, is busy with the forum part and is nearly ready.

Let's do something 100 % FPC, images done with BGRABitmap, web pages by Brook, etc...
« Last Edit: April 01, 2013, 02:32:32 pm by Fred vS »
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

nsunny

  • Full Member
  • ***
  • Posts: 116
  • Code is magic
    • LazPlanet
Re: Suggestions for Lazarus web site
« Reply #38 on: April 01, 2013, 02:16:58 pm »
Again, what do you want to do with it? Then main page? Or the forum?
Implementing the forum with Pascal SW is a nice idea but let's not mix it with the main page layout design. They are 2 very different things.

Reimplementing the whole forum requires lots of work. If you have enough time, energy, motivation and skill to do it, great, go ahead building a prototype including a forum history import feature.

It is a good idea to build the website based on fp. But is it able to bring smf posts in the homepage? (SMF = php, FP <> php) Is it able to template the whole website based on html files? It is so necessary to base shtml (which is nearly not used anymore) for the homepage which much difficult to maintain anyway. If not, I think php is perfect for current scenario. Smf posts can be fetched with two lines of code - one for include-ing a php file and two, running the php function for fetching. (As far I assume, FP will not be able to do that.)

It is better to have something than nothing. The current homepage has two dead links on the main body "About Lazarus", "Mail list information". Is this a brilliant place for the introduction of the IDE that we love? If we love something we tell others about it. That's what a homepage should do. Not using some 10 years old shtml.

If FP can meet our needs for friendlier website then I am cool with making an FP based site. But sacrificing functionality for FP is not a good idea.

Quote
What are the "security reasons"?
The page sources must be public. Security must be obtained by other means.
The php backend should not be public. Only the admins or webmasters should have access to it. But the theme files which make the layout (and may be the page content files) can be opened to public.

You can, of course, provide the php backend in public. But I have read many security articles, and I think it is not good for security. Some articles also suggest hiding the script extension (.php, .asp, .jsp) through htaccess so that users do not know what language has been used to build the website. I am just suggesting. You can make the whole code, including php backend, open to public. But who keeps open the whole website code? I am curious.

Quote
I didn't quite understand the compiled HTML thing. HTML does not need to be compiled.
But HTML templates can. Through php of course. Template engines create meaning out of HTML templates. For example, the template code for creating the recent posts is:

Code: [Select]
<div class="recent_posts">
<h2>Recent Posts</h2>
<ul>
{ foreach value=post from=$recent_posts_array }
<li><a href="{ $post.href }" title="{ $post.subject }">{if $post.new eq "True"} <img src="{ $theme_path }images/new.gif" /> {/if}{ $post.short_subject }</a><br />by { $post.poster.name }

</li>
{ /foreach }
</ul>
<a href="http://www.lazarus.freepascal.org/index.php?action=forum" class="btlink">See all posts...</a>
</div>

How would that supposed to work? With php those variables with curly brackets would be replaced by values. And the foreach loop would also be utilized, just like a programing language, but will less complications. (The compilation would be automatically done when the user accesses the webpage. Webmasters need not to do anything to compile it)
« Last Edit: April 01, 2013, 02:30:00 pm by nsunny »
Lazarus TTS Tutorial | LazPlanet
Lazarus 1.8 | FPC 3.0 | Win7/Linux

nsunny

  • Full Member
  • ***
  • Posts: 116
  • Code is magic
    • LazPlanet
Re: Suggestions for Lazarus web site
« Reply #39 on: April 01, 2013, 03:16:20 pm »
UPDATE:
Recent posts, Recent announcements and Tip of the day is ready for use!!
Check it out:
http://adnan.freevar.com/online/lazarus/

I have created a dummy mockup forum to test the script. It will work on the real lazarus forum as well.

Now one of the major parts. Other pages, and their contents.
Lazarus TTS Tutorial | LazPlanet
Lazarus 1.8 | FPC 3.0 | Win7/Linux

snorkel

  • Hero Member
  • *****
  • Posts: 796
Re: Suggestions for Lazarus web site
« Reply #40 on: April 01, 2013, 05:11:25 pm »
UPDATE:
Recent posts, Recent announcements and Tip of the day is ready for use!!
Check it out:
http://adnan.freevar.com/online/lazarus/

I have created a dummy mockup forum to test the script. It will work on the real lazarus forum as well.

Now one of the major parts. Other pages, and their contents.

That looks great !
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 1.8 and FPC 3.0.4
OS: Windows 10 64 bit

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: Suggestions for Lazarus web site
« Reply #41 on: April 01, 2013, 06:33:38 pm »
OK, cronjobs might do the job. Some elements of the new homepage like the presentation of the random project or automatic detection of the visitor's operating system might, however, as well profit from a Free Pascal backend.

Maybe. I am not against Free Pascal backends or anything.
Now I am mostly worried about the administrative issues of the web plan, and the co-operation it requires.
It requires more effort than for example patches for Lazarus sources do.

Juha

You may be right. That is a question that I can't answer.

If the effort is justified than we should develop a Free Pascal-based machinery, but it should be for sure that this enterprise doesn't draw too much resources from the main development trunk for Lazarus and FPC. On the other hand, it would be an advertisement for Free Pascal, and improved CGI capabilities and other server-side facilities in FPC would be an advance on their own.

It is obvious that porting the forum (which runs excellently with the SMF-based infrastructure) to FPC would be an immense task. It would not only imply to retain the text but also threads, media files, links, inter-thread links, profiles and statistics.

Let's begin with the homepage that is a simpler task. I still suggest to use FPC for its dynamic contents.

If we are successful with this small (yet important) subproject than we may reconsider the situation and decide if we also want to re-implement the forum to a pascal-based infrastructure. I would definitively not recommend, however, to re-implement the wiki and the bug tracker.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3646
  • I like bugs.
Re: Suggestions for Lazarus web site
« Reply #42 on: April 01, 2013, 07:04:25 pm »
If the effort is justified than we should develop a Free Pascal-based machinery, but it should be for sure that this enterprise doesn't draw too much resources from the main development trunk for Lazarus and FPC. On the other hand, it would be an advertisement for Free Pascal, and improved CGI capabilities and other server-side facilities in FPC would be an advance on their own.

I don't believe that people who now develop FPC or Lazarus would leave their project and jump into developing a new forum system. So, there is no danger of drawing resources.
Who is this "we" you refer to? Are you planning to do it yourself, too?
A new forum requires lots of ground work and testing before you can even think of actually using it.
This work can be started any time. You don't need to ask permission from anybody.

Juha

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: Suggestions for Lazarus web site
« Reply #43 on: April 01, 2013, 07:12:03 pm »
Who is this "we" you refer to? Are you planning to do it yourself, too?

I will not have the spare time to do it. However, there is some discussion at http://www.lazarus.freepascal.org/index.php/topic,19225.msg118090.html#msg118090. At least these guys seem to be interested in doing this.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7510
Re: Suggestions for Lazarus web site
« Reply #44 on: April 01, 2013, 07:25:27 pm »
Define "dynamic" context in the above discussions.  IMHO that is a site that presents either realtime data or change in response depending on user input or status (like profile)

Afaik this website doesn't need that, and changing of "Tip of the day" can be easily done at night. Note that FPC has a HTML dom implementation, so it might be a matter of simply reading the template, adding some items to certain marked tags via DOM, and then saving the DOM tree again. And debugging the DOM is in the line of the general FPC development, and is thus synergy with development, not detracting from the core mission statement.

Note that I'm a bit talking from the FPC website perspective here, but some other points to keep in mind:
- the FPC website is generated in multiple languages. So a translations function is important
- the FPC website is mirrored to machines that don't run Apache (the freepascal.stack.nl mirror runs xshttpd), so no Apache specific stuff can be used.

As for Brook, I don't think the first deployment should be the frontpage. It is to critical for that.  Moreover, I don't see a reason for active content or CMS usage at all

If I had to set this up, I would look for

1) a beautiful HTML design that scales well with various screensizes
2) The html being very nice internally so it can be easily modified and parameterised.  All strings should have some attribute with an unique name for translation etc.