SlideShare uma empresa Scribd logo
1 de 27
Alpha Five Blogging Engine A complete blogging engine hosted and developed entirely within an Alpha Five web server. By Jeff Cogswell jeffcogs@gmail.com
Looks just like the current Alpha Five blog but uses Alpha Five itself! Note the .a5w extension.
CSS coded to look like the current blog. Grid showing single record. Uses free form layout Text displays full HTML but isn’t editable here since this page is for the people reading the blog.
Scroll down to see the AJAX-powered comment mechanism.
Click submit and comment instantly appears without a page refresh, thanks to AJAX.
There’s also a page for viewing the entries. This uses a grid as well. Each record in the grid shows up as a date, clickable title, excerpt, and “read more” link. This is one record in the table.
To add entries, you log in using the Alpha Five security system.
Once in, you can add and edit the entries, view the blog, or log out.
Editing an entry is easy thanks to the Rich Edit control of Alpha Five, along with some custom JavaScript to add a couple more buttons. Some custom JavaScript and HTML enhances the functionalityof the Rich Text editor, including a “View Source” for editing the HTML and an “Insert Image”.
Clicking Toggle HTML/Source lets you view and edit the actual HTML source in the Rich Text editor.
Clicking Insert Image lets you select an image URL.
If you view the blog list or entry while logged in, you have an additional toolbar that takes you to the Manage Entries screen or log out.
The toolbar appears on the page for viewing an entry as well – but again, only if you’re logged in. Server-side Xbasic code makes this possible.
A Few Tricks Behind the Scenes
The page for viewing an entry uses three grids – one master, and two linked grids. The master grid displays a single record. The first linked grid lists all of the comments for this entry. The second linked grid is only a form for adding an additional comment.
The only trick required here is updating the comments grid when a new comment is added. This meant saving the grid object into a variable, and then, in the afterGridSubmit function, calling the object’s refresh() method, which uses AJAX to automatically refresh the comments grid, all without leaving or reloading the page.
The entry list page displays either the Excerpt field (if the blogger filled it in) or the first 1000 characters of the Full Text field with the HTML stripped out (if the blogger didn’t provide an excerpt.) Making this work requires some server-side code.
Displaying either the excerpt of a computed excerpt requires some server-side code. The code tests whether the excerpt is present. If not, the code strips out the HTML using Alpha Five Xbasic’s regular expression engine, truncates the string to 1000 characters, and adds an ellipsis.
This, of course, requires using a control type of Custom, and putting the preceding code in the Custom Control Properties definition property.
But in order for the Excerpt custom control property’s function to be able to access the Text field, the Text field had to be present. Including the Text field in the field list but checking “Hide Row” didn’t allow the function to access the field’s data. The simple solution here, then, is to have the text field visible but display nothing.
The page for viewing the entry requires that full HTML be displayed. Using a label control doesn’t work because it doesn’t display HTML as it replaces < and > with the entities &lt; and &gt; respectively. Using a Rich Text Editor isn’t appropriate due to the editing nature. The solution is to simply display HTML. Making this happen required a custom control as shown in the next slide.
The text is sent to the browser verbatim without being HTMLized. Easy! One simple line of code.
In the page for editing an entry, which pops up the detail grid in its own window, adding a couple buttons above the Rich Edit control required some simple tricks as well.
The Freeform Template property contains the code to make this happen. This is some simple HTML that looks identical to the HTML used in the toolbar. In this case, two “buttons” are added, each calling some custom JavaScript.
This custom JavaScript for inserting the image is in the a5w page itself and simply calls the Rich Text Editor object’s insertHTML method. There are two such routines, one for the Text field and one for the Excerpt field. <script> function insertTextImage() { varimgurl = prompt('Image URL');    if (imgurl != null) { ENTRYMANAGEGRID_TEXT_RTEObj._rteObj._insertHTML(             'img','',{src:imgurl})    } } function insertExcerptImage() { varimgurl = prompt('Image URL');     if (imgurl != null) { ENTRYMANAGEGRID_EXCERPT_RTEObj._rteObj._insertHTML(             'img','',{src:imgurl})     } } </script>
The custom JavaScript for toggling the HTML/source is right in the control’s Custom Layout HTML itself: <ul class="GlassBlueNavSysTBSH" style="padding-bottom:3px;">     <li class="GlassBlueNavSysTBSHF" style="float:left">    <a class="GlassBlueNavSysTBSHButtonOn" href="#"  onclick="ENTRYMANAGEGRID_TEXT_RTEObj.toggleDesignMode()">        Toggle HTML/Source    </a>     </li>     <li class="GlassBlueNavSysTBSHL" style="float:clear"> <a class="GlassBlueNavSysTBSHButtonOn" href="#" onclick="insertTextImage()">Insert Image</a>     </li> </ul> {Text}
Done!  All this comes together for a very simple yet complete and powerful blog engine that runs completely under Alpha Five v10. There are a few other things that could be added, for example: ,[object Object]

Mais conteúdo relacionado

Mais procurados

Html Server Button Control VB
Html Server Button Control VBHtml Server Button Control VB
Html Server Button Control VBsunmitraeducation
 
MoodLocator HwT
MoodLocator HwTMoodLocator HwT
MoodLocator HwTJDihlmann
 
Top 8 hidden handy features of word press
Top 8 hidden handy features of word pressTop 8 hidden handy features of word press
Top 8 hidden handy features of word pressJohn057
 
ASP.NET Session 5
ASP.NET Session 5ASP.NET Session 5
ASP.NET Session 5Sisir Ghosh
 
Fiverr html5 test answers 2020
Fiverr html5 test answers 2020Fiverr html5 test answers 2020
Fiverr html5 test answers 2020Roobon Habib
 
Html Server Anchor Control CS
Html Server Anchor Control CSHtml Server Anchor Control CS
Html Server Anchor Control CSsunmitraeducation
 
Ajax control asp.net
Ajax control asp.netAjax control asp.net
Ajax control asp.netSireesh K
 
Data validation in web applications
Data validation in web applicationsData validation in web applications
Data validation in web applicationssrkirkland
 
Html Server Button Control CS
Html Server Button Control CSHtml Server Button Control CS
Html Server Button Control CSsunmitraeducation
 
HTML 5 Simple Tutorial Part 4
HTML 5 Simple Tutorial Part 4HTML 5 Simple Tutorial Part 4
HTML 5 Simple Tutorial Part 4Sanjeev Kumar
 
New Form Element in HTML5
New Form Element in HTML5New Form Element in HTML5
New Form Element in HTML5Zahra Rezwana
 
Web api 2 With MVC 5 With TrainerKrunal
Web api 2 With MVC 5 With TrainerKrunalWeb api 2 With MVC 5 With TrainerKrunal
Web api 2 With MVC 5 With TrainerKrunalKrunal Trivedi
 

Mais procurados (20)

Html Server Button Control VB
Html Server Button Control VBHtml Server Button Control VB
Html Server Button Control VB
 
MoodLocator HwT
MoodLocator HwTMoodLocator HwT
MoodLocator HwT
 
Top 8 hidden handy features of word press
Top 8 hidden handy features of word pressTop 8 hidden handy features of word press
Top 8 hidden handy features of word press
 
Lesson 1
Lesson 1Lesson 1
Lesson 1
 
Ajax and ASP.NET AJAX
Ajax and ASP.NET AJAXAjax and ASP.NET AJAX
Ajax and ASP.NET AJAX
 
ASP.NET Session 5
ASP.NET Session 5ASP.NET Session 5
ASP.NET Session 5
 
Form Validation
Form ValidationForm Validation
Form Validation
 
HTML5 Web Forms
HTML5 Web FormsHTML5 Web Forms
HTML5 Web Forms
 
home inspection demo
home inspection demohome inspection demo
home inspection demo
 
ASP DOT NET
ASP DOT NETASP DOT NET
ASP DOT NET
 
Php
PhpPhp
Php
 
Fiverr html5 test answers 2020
Fiverr html5 test answers 2020Fiverr html5 test answers 2020
Fiverr html5 test answers 2020
 
Html Server Anchor Control CS
Html Server Anchor Control CSHtml Server Anchor Control CS
Html Server Anchor Control CS
 
Web I - 04 - Forms
Web I - 04 - FormsWeb I - 04 - Forms
Web I - 04 - Forms
 
Ajax control asp.net
Ajax control asp.netAjax control asp.net
Ajax control asp.net
 
Data validation in web applications
Data validation in web applicationsData validation in web applications
Data validation in web applications
 
Html Server Button Control CS
Html Server Button Control CSHtml Server Button Control CS
Html Server Button Control CS
 
HTML 5 Simple Tutorial Part 4
HTML 5 Simple Tutorial Part 4HTML 5 Simple Tutorial Part 4
HTML 5 Simple Tutorial Part 4
 
New Form Element in HTML5
New Form Element in HTML5New Form Element in HTML5
New Form Element in HTML5
 
Web api 2 With MVC 5 With TrainerKrunal
Web api 2 With MVC 5 With TrainerKrunalWeb api 2 With MVC 5 With TrainerKrunal
Web api 2 With MVC 5 With TrainerKrunal
 

Semelhante a Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX (tm)

Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateSean Burgess
 
Aloha Editor usage example
Aloha Editor usage exampleAloha Editor usage example
Aloha Editor usage exampleLaurin Herlt
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateSean Burgess
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETwebhostingguy
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsRandy Connolly
 
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Roger Kitain
 
Grails Simple Login
Grails Simple LoginGrails Simple Login
Grails Simple Loginmoniguna
 
Javascript
JavascriptJavascript
JavascriptIblesoft
 
Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Solving Complex JavaScript Issues and Leveraging Semantic HTML5Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Solving Complex JavaScript Issues and Leveraging Semantic HTML5Hamlet Batista
 
Asp.net web page syntax overview
Asp.net web page syntax overviewAsp.net web page syntax overview
Asp.net web page syntax overviewSalam Khan
 
Getting started with html5
Getting started with html5Getting started with html5
Getting started with html5Suresh Kumar
 
Adding disqus to ghost blog
Adding disqus to ghost blogAdding disqus to ghost blog
Adding disqus to ghost blogPaul Graham
 
Aspnet mvc tutorial_9_cs
Aspnet mvc tutorial_9_csAspnet mvc tutorial_9_cs
Aspnet mvc tutorial_9_csMurali G
 

Semelhante a Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX (tm) (20)

Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
Aloha Editor usage example
Aloha Editor usage exampleAloha Editor usage example
Aloha Editor usage example
 
TopicHero Descriptions Tutorial
TopicHero Descriptions TutorialTopicHero Descriptions Tutorial
TopicHero Descriptions Tutorial
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NET
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
 
Html 5
Html 5Html 5
Html 5
 
Before start
Before startBefore start
Before start
 
Vb.Net Web Forms
Vb.Net  Web FormsVb.Net  Web Forms
Vb.Net Web Forms
 
EPiServer Web Parts
EPiServer Web PartsEPiServer Web Parts
EPiServer Web Parts
 
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)
 
HTML computing
HTML computingHTML computing
HTML computing
 
Grails Simple Login
Grails Simple LoginGrails Simple Login
Grails Simple Login
 
Javascript
JavascriptJavascript
Javascript
 
Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Solving Complex JavaScript Issues and Leveraging Semantic HTML5Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Solving Complex JavaScript Issues and Leveraging Semantic HTML5
 
Asp.net web page syntax overview
Asp.net web page syntax overviewAsp.net web page syntax overview
Asp.net web page syntax overview
 
Getting started with html5
Getting started with html5Getting started with html5
Getting started with html5
 
Adding disqus to ghost blog
Adding disqus to ghost blogAdding disqus to ghost blog
Adding disqus to ghost blog
 
Aspnet mvc tutorial_9_cs
Aspnet mvc tutorial_9_csAspnet mvc tutorial_9_cs
Aspnet mvc tutorial_9_cs
 
ajax_pdf
ajax_pdfajax_pdf
ajax_pdf
 

Mais de Richard Rabins

Alpha Anywhere presentation at the the Always on Summit -- Building Offline M...
Alpha Anywhere presentation at the the Always on Summit -- Building Offline M...Alpha Anywhere presentation at the the Always on Summit -- Building Offline M...
Alpha Anywhere presentation at the the Always on Summit -- Building Offline M...Richard Rabins
 
Alpha Anywhere - For Building Enterprise-class Mobile and Web apps Fast - wi...
Alpha Anywhere  - For Building Enterprise-class Mobile and Web apps Fast - wi...Alpha Anywhere  - For Building Enterprise-class Mobile and Web apps Fast - wi...
Alpha Anywhere - For Building Enterprise-class Mobile and Web apps Fast - wi...Richard Rabins
 
Alpha five v11 presentation to the national uk access user group
Alpha five v11 presentation to the national uk access user groupAlpha five v11 presentation to the national uk access user group
Alpha five v11 presentation to the national uk access user groupRichard Rabins
 
Dot netsupport in alpha five v11 coming soon
Dot netsupport in alpha five v11 coming soonDot netsupport in alpha five v11 coming soon
Dot netsupport in alpha five v11 coming soonRichard Rabins
 
Alpha Five v11 and IIS support
Alpha Five v11 and IIS supportAlpha Five v11 and IIS support
Alpha Five v11 and IIS supportRichard Rabins
 
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAXBuilding an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAXRichard Rabins
 
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAXAlpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAXRichard Rabins
 
Alpha Five Version 8 - Rapid tool to build Web & Desktop DB Applications
Alpha Five Version 8 - Rapid tool to build Web & Desktop DB ApplicationsAlpha Five Version 8 - Rapid tool to build Web & Desktop DB Applications
Alpha Five Version 8 - Rapid tool to build Web & Desktop DB ApplicationsRichard Rabins
 

Mais de Richard Rabins (8)

Alpha Anywhere presentation at the the Always on Summit -- Building Offline M...
Alpha Anywhere presentation at the the Always on Summit -- Building Offline M...Alpha Anywhere presentation at the the Always on Summit -- Building Offline M...
Alpha Anywhere presentation at the the Always on Summit -- Building Offline M...
 
Alpha Anywhere - For Building Enterprise-class Mobile and Web apps Fast - wi...
Alpha Anywhere  - For Building Enterprise-class Mobile and Web apps Fast - wi...Alpha Anywhere  - For Building Enterprise-class Mobile and Web apps Fast - wi...
Alpha Anywhere - For Building Enterprise-class Mobile and Web apps Fast - wi...
 
Alpha five v11 presentation to the national uk access user group
Alpha five v11 presentation to the national uk access user groupAlpha five v11 presentation to the national uk access user group
Alpha five v11 presentation to the national uk access user group
 
Dot netsupport in alpha five v11 coming soon
Dot netsupport in alpha five v11 coming soonDot netsupport in alpha five v11 coming soon
Dot netsupport in alpha five v11 coming soon
 
Alpha Five v11 and IIS support
Alpha Five v11 and IIS supportAlpha Five v11 and IIS support
Alpha Five v11 and IIS support
 
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAXBuilding an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
 
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAXAlpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
Alpha Five v10.NEW APPLICATION SERVER. CODELESS AJAX
 
Alpha Five Version 8 - Rapid tool to build Web & Desktop DB Applications
Alpha Five Version 8 - Rapid tool to build Web & Desktop DB ApplicationsAlpha Five Version 8 - Rapid tool to build Web & Desktop DB Applications
Alpha Five Version 8 - Rapid tool to build Web & Desktop DB Applications
 

Último

Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideStefan Dietze
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 

Último (20)

Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 

Building a Blogging System -- Rapidly using Alpha Five v10 with Codeless AJAX (tm)

  • 1. Alpha Five Blogging Engine A complete blogging engine hosted and developed entirely within an Alpha Five web server. By Jeff Cogswell jeffcogs@gmail.com
  • 2. Looks just like the current Alpha Five blog but uses Alpha Five itself! Note the .a5w extension.
  • 3. CSS coded to look like the current blog. Grid showing single record. Uses free form layout Text displays full HTML but isn’t editable here since this page is for the people reading the blog.
  • 4. Scroll down to see the AJAX-powered comment mechanism.
  • 5. Click submit and comment instantly appears without a page refresh, thanks to AJAX.
  • 6. There’s also a page for viewing the entries. This uses a grid as well. Each record in the grid shows up as a date, clickable title, excerpt, and “read more” link. This is one record in the table.
  • 7. To add entries, you log in using the Alpha Five security system.
  • 8. Once in, you can add and edit the entries, view the blog, or log out.
  • 9. Editing an entry is easy thanks to the Rich Edit control of Alpha Five, along with some custom JavaScript to add a couple more buttons. Some custom JavaScript and HTML enhances the functionalityof the Rich Text editor, including a “View Source” for editing the HTML and an “Insert Image”.
  • 10. Clicking Toggle HTML/Source lets you view and edit the actual HTML source in the Rich Text editor.
  • 11. Clicking Insert Image lets you select an image URL.
  • 12. If you view the blog list or entry while logged in, you have an additional toolbar that takes you to the Manage Entries screen or log out.
  • 13. The toolbar appears on the page for viewing an entry as well – but again, only if you’re logged in. Server-side Xbasic code makes this possible.
  • 14. A Few Tricks Behind the Scenes
  • 15. The page for viewing an entry uses three grids – one master, and two linked grids. The master grid displays a single record. The first linked grid lists all of the comments for this entry. The second linked grid is only a form for adding an additional comment.
  • 16. The only trick required here is updating the comments grid when a new comment is added. This meant saving the grid object into a variable, and then, in the afterGridSubmit function, calling the object’s refresh() method, which uses AJAX to automatically refresh the comments grid, all without leaving or reloading the page.
  • 17. The entry list page displays either the Excerpt field (if the blogger filled it in) or the first 1000 characters of the Full Text field with the HTML stripped out (if the blogger didn’t provide an excerpt.) Making this work requires some server-side code.
  • 18. Displaying either the excerpt of a computed excerpt requires some server-side code. The code tests whether the excerpt is present. If not, the code strips out the HTML using Alpha Five Xbasic’s regular expression engine, truncates the string to 1000 characters, and adds an ellipsis.
  • 19. This, of course, requires using a control type of Custom, and putting the preceding code in the Custom Control Properties definition property.
  • 20. But in order for the Excerpt custom control property’s function to be able to access the Text field, the Text field had to be present. Including the Text field in the field list but checking “Hide Row” didn’t allow the function to access the field’s data. The simple solution here, then, is to have the text field visible but display nothing.
  • 21. The page for viewing the entry requires that full HTML be displayed. Using a label control doesn’t work because it doesn’t display HTML as it replaces < and > with the entities &lt; and &gt; respectively. Using a Rich Text Editor isn’t appropriate due to the editing nature. The solution is to simply display HTML. Making this happen required a custom control as shown in the next slide.
  • 22. The text is sent to the browser verbatim without being HTMLized. Easy! One simple line of code.
  • 23. In the page for editing an entry, which pops up the detail grid in its own window, adding a couple buttons above the Rich Edit control required some simple tricks as well.
  • 24. The Freeform Template property contains the code to make this happen. This is some simple HTML that looks identical to the HTML used in the toolbar. In this case, two “buttons” are added, each calling some custom JavaScript.
  • 25. This custom JavaScript for inserting the image is in the a5w page itself and simply calls the Rich Text Editor object’s insertHTML method. There are two such routines, one for the Text field and one for the Excerpt field. <script> function insertTextImage() { varimgurl = prompt('Image URL'); if (imgurl != null) { ENTRYMANAGEGRID_TEXT_RTEObj._rteObj._insertHTML( 'img','',{src:imgurl}) } } function insertExcerptImage() { varimgurl = prompt('Image URL'); if (imgurl != null) { ENTRYMANAGEGRID_EXCERPT_RTEObj._rteObj._insertHTML( 'img','',{src:imgurl}) } } </script>
  • 26. The custom JavaScript for toggling the HTML/source is right in the control’s Custom Layout HTML itself: <ul class="GlassBlueNavSysTBSH" style="padding-bottom:3px;"> <li class="GlassBlueNavSysTBSHF" style="float:left"> <a class="GlassBlueNavSysTBSHButtonOn" href="#" onclick="ENTRYMANAGEGRID_TEXT_RTEObj.toggleDesignMode()"> Toggle HTML/Source </a> </li> <li class="GlassBlueNavSysTBSHL" style="float:clear"> <a class="GlassBlueNavSysTBSHButtonOn" href="#" onclick="insertTextImage()">Insert Image</a> </li> </ul> {Text}
  • 27.
  • 28. A comment editor list that the blogger, when logged in, can access to edit and remove comments.
  • 29. A comment approval mechanism. In this case, comments wouldn’t automatically appear, but would be flagged as needing attention by the blogger.
  • 30. A mechanism that lets people commenting receive an email update when new comments are added.
  • 31. Additional security so a blogger can only edit entries that he or she created, and can only choose his or her own name in the dropdown list for author name.
  • 32. An RSS version that generates RSS. This would be a fascinating test of the grid – display all records, but with no HTML formatting, and with each field carefully coded to display itself in XML format.