Can I use Mongodb with mithril js or vue js? - mongodb

I would like to find out how to connect a database (e.g. Mongodb or MySql) to mithril js or vue js.
Any useful link or tutorials?
Thanks

Mithril is a tiny framework that focuses on MV? There are a minimal number of helpers built-in, such as basic AJAX, basic promises, and basic routing. If you need more functionality, such as database connectivity, you are responsible for writing plain old javascript. To my knowledge there are no publicly available examples of people using Mithril with mongodb. You will need to write a server-side script (python/php/javascript) to make your DB requests. You can then use Mithril's m.request helper to get the data to your app. I would check the mongodb website for such scripts.
This will be of little help to you, but the Mithril wiki has a section on database connectivity. Maybe in the future there will be more community contributions added.
https://github.com/lhorie/mithril.js/wiki/Community-Projects#databases

Related

How do I query an external GraphQL endpoint in Gatsby JS?

I don't seen any clear way to query an outside GraphQL endpoint (i.e. https://somewebsite.com/graphql) for data. Has anyone else done this, and how did you do it?
I assume it requires you to build a custom plugin, but that seems overkill for such a simple need. I have searched the docs and this issue doesn't really ever get addressed. 🤔
In Gatsby V2 you don't need to create your own plugin.
What you need is a plugin called gatsby-source-graphql
gatsby-source-graphql uses schema stitching to combine the schema of a
third-party API with the Gatsby schema.
You can find more info here.
The answer is, as you mentioned, writing a new source plugin. This is how Gatsby gets the data into it's internal GraphQL structure to then query.
Plugins are, at their core, just additions to the gatsby-node, gatsby-browser, and gatsby-ssr files. So you could write the logic needed at the top of your gatsby-node file to avoid abstracting it out into it's own plugin.
If you're not so into writing plugins for gatsby, like me, have a look here.
It explains in detail how you query any graphQL server via the Gatsby sourceNode API and the use of graphql-request.
Helped me to get data for e.g. from graph.cool as well as GraphCMS.
The problem though is that you always have to write 2 different kinds of graphQL queries, as they are usually not compatible to Gatsby's relay style queries. But still easier than building a whole plugin.

Plone usefulness for Backend Development

We have a python based server that uses mongodb database. Our server programs uses RabbitMQ to exchange request/reply packets with many Android apps and perform actions accordingly. In addition to this, now we also need to create a web portal for the admin staff to let them manipulate the database, upload/download files, view data/statistics and trigger actions for android clients. So, the database is going to be common for the portal and the existing server programs.
For the web portal development, I got a recommendation for using Plone. We are comfortable in using traditional Node.js. Could anybody guide me on the use of Plone within this context. Is plone able to communicate with mongodb and existing server side programs?
Plone is a CMS designed around managing web based content and is tightly integrated for storage of its data in the ZODB, a NoSQL database. If data is very custom and isn't all about webpages and website nagivation etc, or if you have a need for the data to live in a different kind of DB then Plone probably isn't the right tool for you. This isn't to say it can't be made to do these these things but you would have to learn a lot about it's internals to make it do these things.

Should I use laravel collective or another component?

I'm starting with Laravel and I've some doubts about the external components.
I've already used the laravel collective and the adamwathan/bootforms and the both show me advantage and disadvantage. I've searched for information or discussion about this and a I didn't find anything
For example, I can build forms extremely fast with these components, but I got limited sometimes.
According with the about session of the laravel Collective they say:
The Laravel Collective is a community organization designed to maintain components that have been removed from the Laravel Framework core
So, if the form is removed from the core, should I continue using this component?
And in the readme from the Bootform, they say
Probably not perfect for your super custom branded ready-for-release apps, but a huge time saver when you are still in the prototyping stage!
What do you think about using external components? Do you think it's a good ideia to use or do you prefer the original core from the Laravel?
After 3 weeks working with Laravel. I've learned somethings:
If you want to build easy forms without html, I recommend you to use the AdamWathan bootform or Laravel collective. The only problem is: These tools doesn't has a good option with you want a very customizable field.
Bootform
Pros
Bootform has more components and functions
Reduced Boilerplate
Automatic Validation State
Some custom forms, like the horizontal forms
Cons
Some difficulties with documentation
Laravel Collective
Pros
All necessary things to build a laravel form, like the CSRF Protection and hidden fields.
What I do
Actually, I'm working with Collective and html. I use a mix of the both, when I need a simple field or specific fields (csrf protection, for example) I use collective and if I need a more customizable field, like a button with an icon or a special element in bootstrap, I use just HTML.
Recently I've had the same dilemma, so I decided to examine Laravel Collective Html package.
I wanted to share my thoughts, therefore I created the following post: Is it beneficial to add Laravel Collective Html into your Laravel Project
Hope you will find it useful.
It comes down to personal preference, Laravel Collectives gives you ease of pre selecting select inputs, csrf out of the box, etc... I found myself using it less and less and then eventually just stopped pulling it in altogether.

Which Framework or CMS for Google-Video like site?

I am working on a Web Project similar to Google-Video.
As for now, I want to start coding the site.
I know some PHP, HTML and MySQL.
I already have:
Database built and ready (in MySQL)
Links and Tags in the Database
The thing is, I don't want to code everything from hand.
As I've seen so far, with CMS it's not possible to use my own database. Or am I wrong?
And what Framework would you suggest me?
Looking forward for your advice!
Thanks
You should probably start over, but use your existing DB design as your logical schema to be implemented in the CMS you eventually choose.
Go to http://cmsmatrix.org/ and compare Drupal, Joomla!, eZ Publish and TYPO3 for the best fit for your requirements.
Also, pay attention to the search engine features available with each one. e.g. eZ Publish eZ Find is based on Lucene.
In terms of functionality ( but excluding add management and your specific layout or graphic-design) you should be able to create a reasonable clone within a few hours using eZ. Here is one example http://untoldstories.eu/ezinfo/about

How to setup a CMS as a backend for iPhone app

I would like my iPhone app to get dynamic content off the net. This content should be managed using a CMS. I would like to know in particular if I can setup Drupal or Joomla or other CMS as a backend for my iphone app to get the content.
Any advice on how this can be achieved would be helpful.
I am completely new to setting up/using CMS.
You can also take a look at StorageRoom, which is a CMS for Mobile Applications.
Disclaimer: I created this myself to scratch my own itch.
Wordpress with the JSON-API plugin is a great solution, especially if you need a web site as well.
You can find a good example here that uses Wordpress and Phonegap to get a basic app going.
If you can access the content in any serialized format (e.g. XML or JSON), it should be no problem to use any CMS as a "backend" for your application.
I'm checking out storageroom, and I'm searching for a similar answer, but I also found osmek to be a bit promising. I might use that one because of the menu templates .Osmek can provide responses in json and xml (and other formats that aren't useful in iphone dev like php, html, and templates)
Feed.Us is another option. I have a series of travel guides iphone apps and use Feed.Us to manage the businesses listed within the apps.
It creates a URL with XML that gets imported into the app.
This seems to be a very promising solution!
Apache Usergrid
I have briefly tried DreamFactory for some trial project but never got around to using it in production. Usergrid seems to be in the right direction in providing a full fledged solution (which can also work for modern web apps)
I'm very curious about Helios (helios.io) and will be trying it out shortly.
At least from the write-up on their site it looks very promising. Its open source, and in beta currently. They also have very easy heroku hosting support.
Helios is an open-source framework that provides essential backend
services for iOS apps, from data synchronization and push
notifications to in-app purchases and passbook integration.
I will update the answer again once I use this for some test project.
you can use any cms or framework to implement this. you need to make a jsonm api to communicate between app and backend server.
For php cms joomla, drupal and wordpress are best.
in frameworks you can use yii, cakephp, laravel or zend
hope this helps..
Also worth taking a look at Cloud CMS:
http://www.cloudcms.com
It's a cloud content management system for mobile and web applications, entirely oriented around JSON and having a fast, fully featured API. Your iOS application could easily grab things, render them, capture data, store it back into the CMS and more. Plus, it gives you a user interface you can drop in front of your business users so that they can create, edit and review things.
Note: I'm one of the developers. That said, worth checking out if for no other reason than for inspiration.
Depending on the data-complexity, perhaps willing a CMS into being a data-store or simple API is overkill when you can leverage file storage services like Google Drive/Apps to GET/POST spreadsheets or other documents in JSON, among other formats.
Is it possible to use Dropbox, Google Drive, Skydrive, etc. as a server space?