Do web pages need to be in HTML5 to use the Data Highlighter or Schema Microdata? - google-search-console

Do my web pages need to be in HTML5 to use the Data Highlighter or Schema.org Microdata?

No, you can use whatever HTML version you want, just make sure it's at least fairly valid.
You can test what Google sees from your structured data with Structured Data Testing Tool

Related

Change CKAN API Interface - are there limitations on the API?

I've looked around the site to see if there are any people who have changed the CKAN API interface so that instead of uploading documents and databases, they can directly type onto the site, but I haven't found any use cases.
Currently, we have a page where people upload data sets through excel forms that they've filled out, but we want to make it a bit more user friendly by changing the API so that they can fill out a form on the page rather than downloading the template, filling it out and then uploading it.
Does CKAN have the ability to support this? If so, are there any examples or use cases of websites that have use forms rather than uploads?
This is certainly possible.
I'm not aware of any existing extensions that provide that functionality, but you can check the official list of CKAN extensions if there's anything that fulfills your needs.
If there is no existing extension that suits you then you could write your own, see the extension guide for details on how to do that.
Adding an API function to CKAN's API is possible, but probably not what you want in this case: the web UI usually does not interact with CKAN via the API but via Flask/Pylons controllers. Hence, you would add your add controller which first serves your form and then processes the submitted inputs.
You can take a look at the ckanext-pages extension, which does exactly that (for editing static pages instead of datasets, but your code would be similar).

How to connect ontology and web application

I'm working on a project, within which we are using semantic web technologies and creating web application allows user to get recommendation in order to take right decision ( won't get into the details).
For me and my team its a first experience to work with ontology.
We've already created ontology (have rdf and owl formatted files)(We are using eclipse to keep them).
Separately, we've created web application. My question how to connect web page and owl, rdf formatted data, more precisely, how to ensure input through webpage to dataset and get output on page.
I've found some info( on old forums), that its easyrdf which can be used as embedded in php script. But not clear.
Based on youtube tutorials, I've downloaded jena fuseki and don't know what is the next step.
I would be glad to get any advice, suggestion :)
In my view, there is no a single way to do this.
I usually set up some back-end application in order to pre-process this kind of information (build SPARQL queries, execute them and parse the results) and then return to the front in some way understandable by that side.
So, you could have all your data in RDF format store, for example, in a TDF exposed by Fuseki and interact with that data with some back-end, aimed to consume, update and parse the results you could find there.
That's my advice, hope could be useful for you.
Good luck!

How to integrate localization (i18n) so that it scales with a React application?

I am currently looking at various i18n npm packages and most seem to insist that the translations are stored in a flat file, e.g. .json formatted file. My questions is whether this has a performance overhead that would be greater then storing the languages in a database, e.g. MongoDB.
For example, if I have 10,000 translations (we will assume that in this particular application only one language file will be needed at a time, i.e. most will be using the application in English and some users may want to set the application to use a different language.) then this will equate to approximately 200kb of data to download before the application can even start being used.
In a React application, a suggested design pattern is to load data using container components, that then pass data to 'dumb' child components. So, would it not make sense to also load translations in the same manner, i.e. group the translations into usage, or by component, so that the data is sent down the wire only when needed, say, from a call to MongoDB?
I would integrate it in your API. That means you can create e.g. a REST or GraphQL API, which handles this for you. In i18n, it is often reasonable to store the data in a hierarchy. This means you can split your translations in different categories (like pages) and simply request those translations, which you really need.
I really like the way of doing it in the react-starter-kit. In this example, you find how they handle it with a GraphQL API and only request those translations, which are really required for rendering the page. Hope this helps.
Important files of the i18n implementation of the react-starter-kit:
GraphQL Query: https://github.com/kriasoft/react-starter-kit/blob/feature/react-intl/src/data/queries/intl.js
Example component implementation: https://github.com/kriasoft/react-starter-kit/blob/feature/react-intl/src/components/Header/Header.js
Of course if you have this amount of translations, I would use a database for a better system usage (in the react starter kit, they use simple file storage which is not really usable with so many translations). A mongodb would be there my first choice, but maybe this is only my own preference of flexibility and own knowledge.
Obviously, you don't want each and every language to be loaded on the client. My understanding of the pattern you described is to use a container component to load the relevant language for the whole app on startup.
When a user switches language, your container will load the relevant language file from the server.
This should work just fine for a small/medium app but has a drawback : you'll need another request to the server after the JS code has loaded to load the i18n data.
Another way to solve this is to use code splitting (and possibly server side rendering) techniques which could allow this workflow :
Server builds a small bundle containing a portion of the i18n data
Client loads the rest of your app code and associated i18n data on demand, as the user navigates through your app
If not yet done having a look at https://react.i18next.com/ might be a good advice. It is based on i18next: learn once - translate everywhere.
Your code will look something like:
<div>{t('simpleContent')}</div>
<Trans i18nKey="userMessagesUnread" count={count}>
Hello <strong title={t('nameTitle')}>{{name}}</strong>, you have {{count}} unread message. <Link to="/msgs">Go to messages</Link>.
</Trans>
Comes with samples for:
- webpack
- cra
- expo.js
- next.js
- storybook integration
- razzle
- dat
- ...
https://github.com/i18next/react-i18next/tree/master/example
Beside that you should also consider workflow during development and later for your translators -> https://www.youtube.com/watch?v=9NOzJhgmyQE

How do I update the content of my app without releasing another version?

I have an app that basically has news and updates about a certain subject. How do I get it to work that when I update something let's say in my website it would also update what's on the app. Do I usee RSS for this?
You need some web service to deliver the data. In terms of what format a web service can use, there are a variety, but two prevalent formats are XML and JSON. RSS is, essentially, a particular form of XML.
On the iOS side, you can parse XML using NSXMLParser (see NSXML Parser Class Reference). If you're parsing JSON, you can use NSJSONSerialization (see NSJSONSerialization Class Referece). For both of these, you can google the class keyword followed by "example" or "demonstration" (e.g., "NSXMLParser example" or "NSJSONSerialization demonstration") and you'll see tons of examples. If you have an RSS feed, you can google something like "iOS RSS example".
It may be dictated by what you can easily render from your server, XML (or, in particular, RSS) or JSON. For example, if you're using some content management system on your web site, it might offer RSS feeds, or something like that. In the absence of that, you may have to write your own server interface to retrieve the data in XML (or RSS) or JSON formats.
In addition to #Rob answer I would point couple mode things:
You can simply prepare databases with your information (like SQLite) and just download them from your web site to your application.
You need to have some way of notifying application about new content and for that you might want to use remote notifications. http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html - this way you can send notify messages to your app, and user will know that there is something new to download and read.

Wordpress custom pages CMS

I'm considering Wordpress as my CMS platform for a client site I'm doing at the moment.
However, I need to create a couple of custom 'modules'. One of these modules is a form that people will be able to complete and have a quote, and once submitted, in a special place in the Wordpress panel (like a menu or something), there will be a listing of all the submitted quotes (just fetching it from a table in my database).
Another one is to manage a cafeteria menu, so the client can add a different meal to each day of the week.
I know perfectly how to do this kind of things using some kind of MVC framework and doing it 'by-hand', but I'm just wondering if this would be possible to do with WP and if yes, what kind of tools I'll have to use.
Thanks
Quite simply, yes, WordPress would be a more-than-capable asset to your criteria. But it's whether the learning curve in getting to know WP outweighs using a framework you're clearly already familiar with?
Personally, it sounds you like you're pretty solid with PHP, and considering the fact that, in my opinion, what you're planning on doing is relatively easy, I'd say WordPress is an excellent solution.
I'd recommend reading about WordPress 3.0's new custom post type API, and skimming the basics of hooks and filters in the Plugin API.
Submitted quotes would merely be a custom post type. You'd be better off writing the front-end code (like handling the form, UI etc.) yourself, either within a theme or plugin, then using wp_insert_post and let WordPress handle all the database administration. In fact, WP will go one step further and set up the entire admin for viewing, editing and deleting quotes.
Post meta (also known as custom fields) is also there for you if you need to store additional information about a quote that doesn't quite fit the post's table structure.
For the menu, this is even easier. I'd say just create a post category called 'Menu', and the client can publish 'dishes' to it as you would with a blog or any similar rolling format.
I've only licked the surface here. Get stuck in with the above, then check out some other goodies like meta boxes and custom taxonomies!
If you want to try a plugin instead of writing something yourself, Flutter might work. It's a little unpolished sometimes but it makes this sort of thing an absolute breeze.