Sponsored Content
Top Forums Programming Wuhan Coronavirus Status for China - Rapid Prototype Blynk App with ESP8266 Post 303043591 by Neo on Saturday 1st of February 2020 11:14:06 AM
Old 02-01-2020
Update:

According to the network, Blynk has apparently responded to my honest opinion and review of their product and business model by blocking our two apps we are running, but that is OK, I expected as much from the Blynk team.

I woke up this morning and built an app using Blynk to help the good people of China in a national crisis.

Now, at the end of the day, I am very unhappy, 100% of that unhappiness is because of Blynk.

Both my apps are now blocked from the Blynk network because I provided an honest assessment of their business model.

Blocked Wuhan Virus in China App (Blocked By Blynk):


Wuhan Coronavirus Status for China - Rapid Prototype Blynk App with ESP8266-blocked_blynkjpeg


My mistake in this task was in choosing Blynk for this app. I will not make that mistake again.
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Function prototype declaration

Hi All, I have the script as below #!bin/bash let k=9 if then echo "Start" Hello echo "End" else echo "failed" fi function Hello() { echo "hello !!!!" } I got the below error : (4 Replies)
Discussion started by: Balasankar
4 Replies

2. Programming

Embarcadero Rapid SQL query for dependency

Team I am using Embarcadero Rapid SQL V8 . When we right click on any procedure/table/view and open the contents. It has dependencies tab, which tell what all are the dependents used . My question is how does this information captured in backend to retrieve the dependency objects in... (0 Replies)
Discussion started by: Perlbaby
0 Replies

3. What is on Your Mind?

Major Changes in New UserCP (v0.63) Prototype

Regarding the latest version of the UserCP prototype (version 0.63) I have made a lot of major changes, including Added a "Posts Timeline" table for the recent posts, complimenting the non-table version earlier, which has been moved off the main menu (link at the bottom of the table). Added a... (4 Replies)
Discussion started by: Neo
4 Replies

4. Programming

NodeMCU ESP8266 Blynk SSL Application for Linux Server Load Averages

Here is a useful SSL (HTTPS) application for anyone with a remote Linux server they want to keep an eye on using Blynk and the NodeMCU ESP8266. This little app also works (have tested as well) on the WeMos D1 ESP8266 Arduino board. The NodeMCU setup could not be easier, just find a... (8 Replies)
Discussion started by: Neo
8 Replies

5. Programming

Wuhan Coronavirus Status App for China - Rapid Prototype using MQTT and the IoT OnOff IOS App

With a little bit of work, was able to build a nice "Wuhan Coronavirus Status" app using MQTT and the IoT-OnOff app. More on this technique here: ESP32 (ESP-WROOM-32) as an MQTT Client Subscribed to Linux Server Load Average Messages The result turned out nice, I think. I like the look and... (10 Replies)
Discussion started by: Neo
10 Replies

6. Programming

A Slightly Better NTP Client for the ESP8266

Was not really happy with the NTP clients for the ESP8266 because, after a few years of game engine programming, I am not a fan of a lot of code and delays in the main loop, so here is a "slightly better NTP client" for the ESP8266. In a nutshell, instead of having a delay in the main loop as a... (1 Reply)
Discussion started by: Neo
1 Replies
Catalyst::Model::Adaptor(3pm)				User Contributed Perl Documentation			     Catalyst::Model::Adaptor(3pm)

NAME
Catalyst::Model::Adaptor - use a plain class as a Catalyst model SYNOPSIS
Given a good old perl class like: package NotMyApp::SomeClass; use Moose; # to provide "new" sub method { 'yay' } Wrap it with a Catalyst model: package MyApp::Model::SomeClass; use base 'Catalyst::Model::Adaptor'; __PACKAGE__->config( class => 'NotMyApp::SomeClass' ); Then you can use "NotMyApp::SomeClass" from your Catalyst app: sub action :Whatever { my ($self, $c) = @_; my $someclass = $c->model('SomeClass'); $someclass->method; # yay } Note that "NotMyApp::SomeClass" is instantiated at application startup time. If you want the adapted class to be created for call to "$c->model", see Catalyst::Model::Factory instead. If you want the adapted class to be created once per request, see Catalyst::Model::Factory::PerRequest. DESCRIPTION
The idea is that you don't want your Catalyst model to be anything other than a line or two of glue. Using this module ensures that your Model classes are separate from your application and therefore are well-abstracted, reusable, and easily testable. Right now there are too many modules on CPAN that are Catalyst-specific. Most of the models would be better written as a class that handles most of the functionality with just a bit of glue to make it work nicely with Catalyst. This module aims to make integrating your class with Catalyst trivial, so you won't have to do any extra work to make your model generic. For a good example of a Model that takes the right design approach, take a look at Catalyst::Model::DBIC::Schema. All it does is glues an existing DBIx::Class::Schema to Catalyst. It provides a bit of sugar, but no actual functionality. Everything important happens in the "DBIx::Class::Schema" object. The end result of that is that you can use your app's DBIC schema without ever thinking about Catalyst. This is a Good Thing. Catalyst is glue, not a way of life! CONFIGURATION
Subclasses of this model accept the following configuration keys, which can be hard-coded like: package MyApp::Model::SomeClass; use base 'Catalyst::Model::Adaptor'; __PACKAGE__->config( class => 'NotMyApp::SomeClass' ); Or be specified as application config: package MyApp; MyApp->config->{'Model::SomeClass'} = { class => 'NotMyApp::SomeClass' }; Or in your ConfigLoader-loaded config file: --- Model::SomeClass: class: NotMyApp::SomeClass args: foo: ... bar: ... This is exactly like every other Catalyst component, so you should already know this. Anyway, here are the options: class This is the name of the class you're adapting to Catalyst. It MUST be specified. Your application will die horribly if it can't require this package. constructor This is the name of the class method in "class" that will create an instance of the class. It defaults to "new". Your application will die horribly if it can't call this method. args This is a hashref of arguments to pass to the constructor of "class". It is optional, of course. If you omit it, nothing is passed to the constructor (as opposed to "{}", an empty hashref). METHODS
There are no methods that you call directly. When you call "$c->model" on a model that subclasses this, you'll get back an instance of the class being adapted, not this model. These methods are called by Catalyst: COMPONENT Setup this component. CUSTOMIZING THE PROCESS
By default, the instance of your adapted class is instantiated like this: my $args = $self->prepare_arguments($app); # $app sometimes called $c $adapted_class->$constructor($self->mangle_arguments($args)); Since a static hashref of arguments may not be what $class needs, you can override the following methods to change what $args is. prepare_arguments This method is passed the entire configuration for the class and the Catalyst application, and returns the hashref of arguments to be passed to the constructor. If you need to get dynamic data out of your application to pass to the consturctor, do it here. By default, this method returns the "args" configuration key. Example: sub prepare_arguments { my ($self, $app) = @_; # $app sometimes written as $c return { foobar => $app->config->{foobar}, baz => $self->{baz} }; } mangle_arguments This method is passed the hashref from "prepare_arguments", mangles them into a form that your constructor will like, and returns the mangled form. If your constuctor wants a list instead of a hashref, this is your opportunity to do the conversion. Example: sub mangle_arguments { my ($self, $args) = @_; return %$args; # now the args are a plain list } If you need to do more than this, you might as well just write the whole class yourself. This module is designed to make the common case work with 1 line of code. For special needs, it's easier to just write the model yourself. SEE ALSO
If you need a new instance returned each time "$c->model" is called, use Catalyst::Model::Factory instead. If you need to have exactly one instance created per request, use Catalyst::Model::Factory::PerRequest instead. AUTHOR
Jonathan Rockway "<jrockway@cpan.org>" LICENSE
This module is Copyright (c) 2007 Jonathan Rockway. You may use, modify, and redistribute it under the same terms as Perl itself. perl v5.10.1 2010-08-04 Catalyst::Model::Adaptor(3pm)
All times are GMT -4. The time now is 01:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy