SlideShare une entreprise Scribd logo
1  sur  33
Becoming a coder in 60 minutes
mewssystems.com
CODING FOR MEWS
How to install a new hotel?
How to create a nice confirmation e-mail?
How to format T&C’s?
How to make custom bill headers?
How to format the text on the registration card?
XML
HTML
Hotel installation
mewssystems.com
HOTEL INSTALLATION
Why installing via an XML file?
1) You can re-use the same file for Demo and Production.
2) You can send the file to a colleague for a review!
3) If something goes wrong, you can send the file to MEWS
for an analysis of the problem.
4) You can re-use parts of the file when installing a similar hotel.
XML
mewssystems.com
XML
eXtensible Markup Language
mewssystems.com
XML – BASIC TERMINOLOGY
<element>Text content.</element>
opening tag closing tag
name of the element
no whitespace
This is an XML element. It has 3 parts – opening tag, closing tag and content. The content can be a text, or another XML element. Always make sure that there
is no space within your opening tag. A space is a separator between attributes in XML. That’s why you cannot use it in the name of the element. Always make
sure that the name of the closing tag matches the name of the opening tag. Case sensitive – capital letters matter. The forward slash always needs to be at the
start of the closing tag.
mewssystems.com
XML – BASIC TERMINOLOGY
<price>300</price>
Q: What is the name of this element?
Q: What is the content of this element?
mewssystems.com
XML – BASIC TERMINOLOGY
<element/>
This is an element without content. It’s called empty element or, also, self-closing element. The opening tag is also a closing one. That’s why the slash is present
at the end of the opening/closing tag.
mewssystems.com
XML – BASIC TERMINOLOGY
<soldOut/>
The meaning of the self closing tag, when it does not have any content is its presence itself. If you have such an element inside of an element called
roomCategory, it probably means that all the rooms of that category are sold. If the element is not there, it’s not sold out.
mewssystems.com
XML – BASIC TERMINOLOGY
<element attribute=“value”>Content</element>
attribute name
no whitespace
attribute value
Attributes are another way how to structure information. You can add more informatin about the element.
mewssystems.com
XML – BASIC TERMINOLOGY
<price currency=“EUR”>300</element>
mewssystems.com
XML – BASIC TERMINOLOGY
<price currency=“EUR” vat=“19”>300</element>
An element can have more attributes. Those are separated by space. That’s, again, why the name of the attribute cannot contain a space. Also, the value of the
attribute needs to be enclosed in quotes. The application that reads such a file will then recognize, where the value starts and where it ends.
Q: What’s the error here?
mewssystems.com
XML – BASIC TERMINOLOGY
<hotel name=“Luxury Suites”>
<room number=“A101”/>
</hotel>
You can nest elements into each other. Always make sure that one element is nested in another one. You cannot cross them. If you open an element hotel and
then an element room, you need to close them in the order room, hotel. If you do otherwise, those are interleaved and your XML is not valid.
mewssystems.com
XML – BASIC DOCUMENT STRUCTURE
<?xml version=“1.0” encoding=“UTF-8”?>
<root>
</root>
<child>
</child>
<childOfChild>
Text content of an element.
</childOfChild>
<anotherChild />
<child-with-attribute attributeName=“value” />
<!-- This is an XML comment -->
mewssystems.com
XML – EXAMPLE
<?xml version=“1.0” encoding=“UTF-8”?>
<animals>
<wild>
<dog owner=“Matt” kind=“Jack Russel”>
Beyoncé
</dog>
<anonymousCat/>
<cat knownAs=“Gucci” />
<!-- No more animals in this XML file. -->
</wild>
</animals>
mewssystems.com
XML – COMMON MISTAKES
<?xml version=“1.0” encoding=“UTF-8”?>
<root>
<child>
<dog>
Beyoncé
</cat>
<hi>
<hello reason=To be kind>
Greetings!
</hi>
</hello>
<dog known As=“Gucci” nickname=“Big “G””>
<!- No more animals in this XML file. -->
</Child>
<root>
<animals>
</animals>
There are 10 errors. Identify them.
mewssystems.com
XML – COMMON MISTAKES
<?xml version=“1.0” encoding=“UTF-8”?>
<root>
<child>
<dog>
Beyoncé
</cat>
<hi>
<hello reason=To be kind>
Greetings!
</hi>
</hello>
<dog known As=“Gucci” nickname=“Big “G””>
<!- No more animals in this XML file. -->
</Child>
<root>
<animals>
</animals>
mewssystems.com
XML – COMMON MISTAKES
<?xml version=“1.0” encoding=“UTF-8”?>
<root>
<child>
<dog>
Beyoncé
</dog>
<hi>
<hello reason=“To be kind”>
Greetings!
</hello>
</hi>
<dog knownAs=“Gucci” nickname=“Big &quot;G&quot;” />
<!-- No more animals in this XML file. -->
</child>
<root>
If you need to use quotes in the value of an attribute, you need to use so-called XML Entities that represent quotes.
mewssystems.com
XML VALIDATION
Always make sure that your file is well-formed
Use some XML editor (Atom, Notepad++, SublimeText, …)
Use some XML validator, e.g. https://validator.w3.org/
Cross-validate your files with your colleagues.
Do not use format-aware text editors like Word, TextEdit, Google Docs, …
mewssystems.com
MEWS XML INSTALLATION FILE
Before you start:
1) Choose an XML editor
2) Remember, how a well-formed XML looks like.
3) Get the Excel config file from the customer and validate it.
4) Obtain the current version of the installer file template.
DEMO TIME!
(XML INSTALLATION SAMPLE)
HTML
mewssystems.com
HTML
HyperText Markup Language
mewssystems.com
HTML
Special case of XML.
A way of telling a browser (web browser, e-mail client, …),
how a document should look like.
We highly recommend to use just a very small subset
(or a web developer).
E-mail clients often support a very small subset of HTML. You need someone with experience to make an advanced confirmation e-mail.
mewssystems.com
HTML - FORMATTING ELEMENTS
<p>, <br />
<strong>, <em>
<img src=“http://…” width=“130” height=“90” />
<h1>, <h2>, <h3>, <h4>, <h5>, <h6>
<ul>, <ol>, <li>
<hr />
<a href=“http://...” target=“_blank”>
Click here!
</a>
DEMO TIME!
(BASIC HTML SAMPLE)
MEWS HTML templates
mewssystems.com
HTML TEMPLATES
Some fields in MEWS expect you to fill them in with an HTML
template. Moreover, the HTML can contain special
{placeholders}
that are automatically replaced when MEWS generates the
corresponding document.
mewssystems.com
HTML TEMPLATES
<p>
Dear {Name}, <br />
welcome to our luxury hotel! Pleasure to meet you!
</p>
{DetailsHtml}
<p>
Kind regards, <br />
the team of the {EnterpriseName} hotel
</p>
DEMO TIME!
(CONFIRMATION E-MAIL)
Questions?
mewssystems.com
LINKS
IT crowd scene
CodePen – Confirmation e-mail
Installation template

Contenu connexe

Tendances

Introduction to ExtJS
Introduction to ExtJSIntroduction to ExtJS
Introduction to ExtJSArun Prasad
 
HTML 5 Simple Tutorial Part 4
HTML 5 Simple Tutorial Part 4HTML 5 Simple Tutorial Part 4
HTML 5 Simple Tutorial Part 4Sanjeev Kumar
 
Web engineering - HTML Form
Web engineering -  HTML FormWeb engineering -  HTML Form
Web engineering - HTML FormNosheen Qamar
 
05 html-forms
05 html-forms05 html-forms
05 html-formsPalakshya
 
Designing an ExtJS user login panel
Designing an ExtJS user login panelDesigning an ExtJS user login panel
Designing an ExtJS user login panelArun Prasad
 

Tendances (7)

Introduction to ExtJS
Introduction to ExtJSIntroduction to ExtJS
Introduction to ExtJS
 
HTML 5 Simple Tutorial Part 4
HTML 5 Simple Tutorial Part 4HTML 5 Simple Tutorial Part 4
HTML 5 Simple Tutorial Part 4
 
HTML5 Web Forms
HTML5 Web FormsHTML5 Web Forms
HTML5 Web Forms
 
Web engineering - HTML Form
Web engineering -  HTML FormWeb engineering -  HTML Form
Web engineering - HTML Form
 
05 html-forms
05 html-forms05 html-forms
05 html-forms
 
Form Validation
Form ValidationForm Validation
Form Validation
 
Designing an ExtJS user login panel
Designing an ExtJS user login panelDesigning an ExtJS user login panel
Designing an ExtJS user login panel
 

En vedette

Best new yorks_hotel
Best new yorks_hotelBest new yorks_hotel
Best new yorks_hotelBIP America
 
Talk Like TED: 3 Unbreakable Laws of Communication
Talk Like TED: 3 Unbreakable Laws of Communication Talk Like TED: 3 Unbreakable Laws of Communication
Talk Like TED: 3 Unbreakable Laws of Communication Carmine Gallo
 
The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...
The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...
The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...Carmine Gallo
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldabaux singapore
 

En vedette (6)

Best new yorks_hotel
Best new yorks_hotelBest new yorks_hotel
Best new yorks_hotel
 
Talk Like TED: 3 Unbreakable Laws of Communication
Talk Like TED: 3 Unbreakable Laws of Communication Talk Like TED: 3 Unbreakable Laws of Communication
Talk Like TED: 3 Unbreakable Laws of Communication
 
Digital Storytelling for Social Impact
Digital Storytelling for Social ImpactDigital Storytelling for Social Impact
Digital Storytelling for Social Impact
 
The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...
The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...
The Storyteller's Secret: 3 Keys to Mastering Storytelling to Win Hearts and ...
 
5 Storytelling Lessons From Superhero Stories
5 Storytelling Lessons From Superhero Stories5 Storytelling Lessons From Superhero Stories
5 Storytelling Lessons From Superhero Stories
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 

Similaire à Becoming a coder in 60 minutes - Mews Commander PMS

Similaire à Becoming a coder in 60 minutes - Mews Commander PMS (20)

Xml
XmlXml
Xml
 
XML notes.pptx
XML notes.pptxXML notes.pptx
XML notes.pptx
 
Xml 1
Xml 1Xml 1
Xml 1
 
Xml tutorial
Xml tutorialXml tutorial
Xml tutorial
 
Web engineering notes unit 4
Web engineering notes unit 4Web engineering notes unit 4
Web engineering notes unit 4
 
Android de la A a la Z XML Ulises Gonzalez
Android de la A a la Z  XML Ulises GonzalezAndroid de la A a la Z  XML Ulises Gonzalez
Android de la A a la Z XML Ulises Gonzalez
 
Xml intro1
Xml intro1Xml intro1
Xml intro1
 
Wp unit III
Wp unit IIIWp unit III
Wp unit III
 
Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3
 
Web engineering UNIT IV as per RGPV syllabus
Web engineering UNIT IV as per RGPV syllabusWeb engineering UNIT IV as per RGPV syllabus
Web engineering UNIT IV as per RGPV syllabus
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
Xhtml Basics
Xhtml BasicsXhtml Basics
Xhtml Basics
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
Xhtml Basics
Xhtml BasicsXhtml Basics
Xhtml Basics
 
Web programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTH
Web programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTHWeb programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTH
Web programming unit IIII XML &DOM NOTES BY BHAVSINGH MALOTH
 
Unit 2.2
Unit 2.2Unit 2.2
Unit 2.2
 
5. Frames & Forms.pdf
5. Frames & Forms.pdf5. Frames & Forms.pdf
5. Frames & Forms.pdf
 
CTDA Workshop on XML and MODS
CTDA Workshop on XML and MODSCTDA Workshop on XML and MODS
CTDA Workshop on XML and MODS
 
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptx
 
Unit 2.2
Unit 2.2Unit 2.2
Unit 2.2
 

Dernier

Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 

Dernier (20)

Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 

Becoming a coder in 60 minutes - Mews Commander PMS

  • 1. Becoming a coder in 60 minutes
  • 2. mewssystems.com CODING FOR MEWS How to install a new hotel? How to create a nice confirmation e-mail? How to format T&C’s? How to make custom bill headers? How to format the text on the registration card? XML HTML
  • 4. mewssystems.com HOTEL INSTALLATION Why installing via an XML file? 1) You can re-use the same file for Demo and Production. 2) You can send the file to a colleague for a review! 3) If something goes wrong, you can send the file to MEWS for an analysis of the problem. 4) You can re-use parts of the file when installing a similar hotel.
  • 5. XML
  • 7. mewssystems.com XML – BASIC TERMINOLOGY <element>Text content.</element> opening tag closing tag name of the element no whitespace This is an XML element. It has 3 parts – opening tag, closing tag and content. The content can be a text, or another XML element. Always make sure that there is no space within your opening tag. A space is a separator between attributes in XML. That’s why you cannot use it in the name of the element. Always make sure that the name of the closing tag matches the name of the opening tag. Case sensitive – capital letters matter. The forward slash always needs to be at the start of the closing tag.
  • 8. mewssystems.com XML – BASIC TERMINOLOGY <price>300</price> Q: What is the name of this element? Q: What is the content of this element?
  • 9. mewssystems.com XML – BASIC TERMINOLOGY <element/> This is an element without content. It’s called empty element or, also, self-closing element. The opening tag is also a closing one. That’s why the slash is present at the end of the opening/closing tag.
  • 10. mewssystems.com XML – BASIC TERMINOLOGY <soldOut/> The meaning of the self closing tag, when it does not have any content is its presence itself. If you have such an element inside of an element called roomCategory, it probably means that all the rooms of that category are sold. If the element is not there, it’s not sold out.
  • 11. mewssystems.com XML – BASIC TERMINOLOGY <element attribute=“value”>Content</element> attribute name no whitespace attribute value Attributes are another way how to structure information. You can add more informatin about the element.
  • 12. mewssystems.com XML – BASIC TERMINOLOGY <price currency=“EUR”>300</element>
  • 13. mewssystems.com XML – BASIC TERMINOLOGY <price currency=“EUR” vat=“19”>300</element> An element can have more attributes. Those are separated by space. That’s, again, why the name of the attribute cannot contain a space. Also, the value of the attribute needs to be enclosed in quotes. The application that reads such a file will then recognize, where the value starts and where it ends. Q: What’s the error here?
  • 14. mewssystems.com XML – BASIC TERMINOLOGY <hotel name=“Luxury Suites”> <room number=“A101”/> </hotel> You can nest elements into each other. Always make sure that one element is nested in another one. You cannot cross them. If you open an element hotel and then an element room, you need to close them in the order room, hotel. If you do otherwise, those are interleaved and your XML is not valid.
  • 15. mewssystems.com XML – BASIC DOCUMENT STRUCTURE <?xml version=“1.0” encoding=“UTF-8”?> <root> </root> <child> </child> <childOfChild> Text content of an element. </childOfChild> <anotherChild /> <child-with-attribute attributeName=“value” /> <!-- This is an XML comment -->
  • 16. mewssystems.com XML – EXAMPLE <?xml version=“1.0” encoding=“UTF-8”?> <animals> <wild> <dog owner=“Matt” kind=“Jack Russel”> Beyoncé </dog> <anonymousCat/> <cat knownAs=“Gucci” /> <!-- No more animals in this XML file. --> </wild> </animals>
  • 17. mewssystems.com XML – COMMON MISTAKES <?xml version=“1.0” encoding=“UTF-8”?> <root> <child> <dog> Beyoncé </cat> <hi> <hello reason=To be kind> Greetings! </hi> </hello> <dog known As=“Gucci” nickname=“Big “G””> <!- No more animals in this XML file. --> </Child> <root> <animals> </animals> There are 10 errors. Identify them.
  • 18. mewssystems.com XML – COMMON MISTAKES <?xml version=“1.0” encoding=“UTF-8”?> <root> <child> <dog> Beyoncé </cat> <hi> <hello reason=To be kind> Greetings! </hi> </hello> <dog known As=“Gucci” nickname=“Big “G””> <!- No more animals in this XML file. --> </Child> <root> <animals> </animals>
  • 19. mewssystems.com XML – COMMON MISTAKES <?xml version=“1.0” encoding=“UTF-8”?> <root> <child> <dog> Beyoncé </dog> <hi> <hello reason=“To be kind”> Greetings! </hello> </hi> <dog knownAs=“Gucci” nickname=“Big &quot;G&quot;” /> <!-- No more animals in this XML file. --> </child> <root> If you need to use quotes in the value of an attribute, you need to use so-called XML Entities that represent quotes.
  • 20. mewssystems.com XML VALIDATION Always make sure that your file is well-formed Use some XML editor (Atom, Notepad++, SublimeText, …) Use some XML validator, e.g. https://validator.w3.org/ Cross-validate your files with your colleagues. Do not use format-aware text editors like Word, TextEdit, Google Docs, …
  • 21. mewssystems.com MEWS XML INSTALLATION FILE Before you start: 1) Choose an XML editor 2) Remember, how a well-formed XML looks like. 3) Get the Excel config file from the customer and validate it. 4) Obtain the current version of the installer file template.
  • 23. HTML
  • 25. mewssystems.com HTML Special case of XML. A way of telling a browser (web browser, e-mail client, …), how a document should look like. We highly recommend to use just a very small subset (or a web developer). E-mail clients often support a very small subset of HTML. You need someone with experience to make an advanced confirmation e-mail.
  • 26. mewssystems.com HTML - FORMATTING ELEMENTS <p>, <br /> <strong>, <em> <img src=“http://…” width=“130” height=“90” /> <h1>, <h2>, <h3>, <h4>, <h5>, <h6> <ul>, <ol>, <li> <hr /> <a href=“http://...” target=“_blank”> Click here! </a>
  • 29. mewssystems.com HTML TEMPLATES Some fields in MEWS expect you to fill them in with an HTML template. Moreover, the HTML can contain special {placeholders} that are automatically replaced when MEWS generates the corresponding document.
  • 30. mewssystems.com HTML TEMPLATES <p> Dear {Name}, <br /> welcome to our luxury hotel! Pleasure to meet you! </p> {DetailsHtml} <p> Kind regards, <br /> the team of the {EnterpriseName} hotel </p>
  • 33. mewssystems.com LINKS IT crowd scene CodePen – Confirmation e-mail Installation template

Notes de l'éditeur

  1. Tags (přívěsky)