#get access token from authorization code java
Explore tagged Tumblr posts
codehunger · 4 years ago
Text
Docusign refresh token - increase access token life span
Docusign refresh token – increase access token life span
In this blog, we will see how we can increase access token life span by DocuSign refresh token in laravel, as you see by default access token life span is 8 hours and after that again you need the access token in order to call DocuSign API. But by using the DocuSign refresh token we can again create the access token by which we call the API’s. To call the refresh token API , remember you…
Tumblr media
View On WordPress
0 notes
bestwallartdesign · 3 years ago
Text
Keycloak: an IAM solution your enterprise should consider
Tumblr media
According to the State of Developer-Driven Security 2022 survey from Secure Code Warrior, as many as 86% of the developers interviewed do not view application security as a top priority when writing code! This is bad news — especially in today’s world of remote work, where applications are often cloud-based and available over various networks.
Application security is something every organization needs to pay attention to, as a breach could avalanche into huge financial losses. There are several application security solutions, of which Keycloak is an excellent one.
Related articles
Service Mesh: The best way to Encrypt East-West traffic in Kubernetes
How does a No-Code App Builder help enterprises?
What is Keycloak?
Keycloak is an open-source identity and access management (IAM) solution developed by RedHat. It can be used by teams to secure the development process, and also the application itself after development is complete.
Keycloak is a reliable solution that provides a dynamic single sign-on (SSO) and single sign-out, and supports protocols such as OAuth 2.0, SAML 2.0, and OpenId Connect.
DevOps teams may be based remotely, and handle a large number of assets, each with different access rights for everything from files, APIs, and libraries, to repositories and databases. Keycloak is a good IAM solution for such requirements because it provides SSO, user authentication, and access restriction.
Here are some of the key benefits of using Keycloak.
Greater security
Keycloak is based on a set of administrative user interfaces and so can create permissions for protected resources, check them against authorization policies, and enforce authorization decisions.
Keycloak authenticates the user by creating a one-time temporary code, so the app doesn’t need login forms to authenticate and store users. Shorter sessions that force users to re-authenticate after a set time are also possible using Keycloak — this is a best practice to curtail vulnerabilities.
Smooth authentication process
Keycloak supports different authentication protocols to allow developers to cover many types of applications with different security demands, using a single tool.
It’s easy to implement security features with Keycloak. The tool also can be configured to allow users to log in with their Google or social media accounts. And since Keycloak sends authentication mails directly, no separate setup is needed.
Keycloak also lends itself to two-factor authentication, which is recommended for most applications, and mandatory for all financial-based applications.
Easy maintenance and integration
In most cases, users need to develop the code to authenticate the user and generate authentication tokens, but this development process is automatic using Keycloak.
With Keycloak, one need not maintain Users and Passwords in the application. This reduces user maintenance. For instance, after logging into the application with a username and password, Keycloak first validates the authentication and generates an OTP, which allows the user to enter the application.
Keycloak integrates easily with Java-based support application frameworks like Springboot, as well as non-Java frameworks like .Net, without the need to migrate data.
CloudNow secures all development projects by following best practices including the use of a powerful IAM solution like Keycloak. Cloudnow technologies offer application development services and application modernization services. We work with enterprises to facilitate easy login using an IAM on the final app as well. Get in touch with us today to understand the IAM solution that works for you.
0 notes
adityakapre · 4 years ago
Text
Aditya Kapre of Shrewsbury, Massachusetts Explains How APIs Work
August 29, 2021
As the name suggests, API keys are simply an authentication password between computer applications. They are widely used anywhere applications are present. If you are wondering, ‘How do API keys work?’ or ‘What is an API key?’, Aditya Kapre, software developer from Shrewsbury, Massachusetts discusses it all in this article.
API Keys: What are they?
"An API key is a piece of code that acts as a unique identifier of users, developers, and the programs making the API call."
Aditya Kapre stated
.
"Before we discuss what an API key is, let’s first talk about APIs. An Application Programming Interface allows software applications to interact with each other, send and receive data, and share functionality. These connections between internal applications and those integrated for your consumers and business partners help organize and optimize your systems."
Aditya Kapre added
.
So, what is an API key? This key is essentially a security protocol that usually takes the form of randomly generated characters to protect your API. When one API calls another, the key is used to identify and grant access to the former. Thus, this code gets passed in by computer applications to perform two key (pun intended) tasks:
● Identification: Identifies the application or project trying to make a call to the API in question.
● Authorization: Checks whether the calling party has been granted access to make the call and if the API in question has been enabled.
API keys also allow ESP (Extensible Service Proxy), which lets you reject calls from applications you have not granted access to or enabled in the API.
When to Use APIs?
API varies a lot from user authentication. This is because the latter identifies the user (or the person using the program) instead of the program itself. An authentication token also lets the endpoint check if permission has been granted for it to make the call.
"API keys can be embedded in the software of various kinds of coding languages like Java or Python. However, they cannot be used to access private data i.e. individual users, or to secure authorization. Typically, they can be used for web and mobile-based applications (which developers typically call projects) that are not attached to a back-end server." Aditya Kapre explains.
Therefore, it is advised that they usually be used for:
● Blocking anonymous traffic. In case you need to debug an issue, API keys can identify a program’s traffic for the API producer.
● Controlling the total number of calls.
● Determining the usage patterns in your API traffic and using it to restrict project usage to specific environments or IP addresses.
How do you get an API key?
You need to request an API key from the owner of the concerned application service if you want to make a call to their API. Application owners usually publish the process for getting the key.
Obtaining the required key is a simple process. You would need to set up an account with the owner and register for the given project. Then, you would need to navigate through the documentation page on the API console to generate the new key.
Closing Thoughts
API keys have widespread use nowadays. From Amazon Web Services to Google maps, all these famous platforms have utilities for these codes. Even government bodies and healthcare systems use them.
"API keys are relatively less secure because they don’t use two-factor authentication. This means that APIs are particularly helpful in everyday business that does not necessarily require the sharing of extremely sensitive information. On a positive note, even though it is essential to keep your API key safe, a compromised key will provide limited access." Aditya Kapre concluded.
In a nutshell, despite its limited usage, API keys do play a key role in making sure that the connection and exchange of data between various applications are authorized and legitimate.
About Aditya Kapre
Based in Shrewsbury, Massachusetts,
Aditya Kapre is a software engineer
with over 6 years of experience. Aditya plays a major role in improving recommendations and personalization API using AWS. Through his commitment to this role, he has helped prominent companies improve; using the software he develops that is scalable and has good performance footprints along with security.
Aditya Kapre Software Engineer Visit us on social media: Facebook Twitter LinkedIn
0 notes
cheffox134 · 4 years ago
Text
Evernote Api Examples
Tumblr media
How To Use Evernote
Evernote Api Examples For Software
Sample Code Code snippets and sample apps demonstrating how to use the Evernote API Sample code demonstrating how to interact with the Evernote Cloud API is now included in our SDK s, which are available for the following languages/platforms.
Creating Notes
In this guide, we'll discuss how to create simple text notes as well as notes containing attachments using the Evernote Cloud API.
The most basic Evernote note will contain only text. They can get much more complex than that, of course, but we need to crawl before we can walk.
Prerequisites
To proceed with this example, we’ll assume that the following are already in place:
You have a developer token (or a working OAuth implementation by which you can retrieve a valid authentication token)
You have an instance of UserStore and NoteStore
Creating notes in Evernote is done using the NoteStore.createNote API function. This function takes two arguments: a valid auth token (as a string) and an instance of Types.Note. The Note instance, in turn, will need to have the following attributes defined at minimum before we can send it to the API:
Note.title — the title of the note
Note.content — the body of the note, formatted as ENML (Evernote Markup Language)
Optionally, we can also set the GUID of the notebook where we’d like this note to reside (as Note.notebookGuid). If we don’t provide this value, the note will be created in the account’s default notebook.
Each note’s body must begin with two things: the standard XML version declaration and the link to the ENML DOCTYPE definition for Evernote notes.
The XML version declaration will look like this:
The ENML DOCTYPE definition (DTD) for notes will look like this:
If either of these nodes is omitted in the note body, the Evernote API will reject the note as malformed and invalid.
Assuming both of those pieces are in place, now we just need to add the body of the note, which must be wrapped in <en-note> tags. Here is the body of a simple (yet complete) Evernote note:
If we take the above XML and a title, we have the necessary parts to create a very simple text note.
Below you’ll find sample code that performs the entire note creation process.
In addition to text, notes can also contain attachments (called “Resources” in the Evernote API). These files can be of any file type, but certain files will be represented differently.
This section will describe how to add various attachments—audio, images, other files—to a note before it is created. First, let’s talk about the Resource data type (defined here).
Types.Resource
When we add a new Resource to a note, many of the members of this object will be set by the Evernote Cloud API when the resource is created: the Resource’s GUID, the GUID of the Note object containing the Resource, any recognition data as well as the Resource’s Update Sequence Number (USN).
To take an ordinary file and make it into a Resource object, we need to perform the following steps:
Determine the MIME type of the file to be attached.
Read the contents of the file and use it to create an instance of Types.Data (which will then be assigned to the Resource object’s data member).
Generate an MD5 hash of the contents of the file.
This is the minimum amount of information necessary to attach a file to a Note, but we should add one last thing in the interest of completeness: the ResourceAttributes member. (Defined here), ResourceAttributes lets us define things like the filename, source URL and other data about the Resource.
Here’s a simple function for turning a collection of files into Resource instances suitable for adding to an Evernote note:
Creating a Resource doesn’t do us any good until we add it to a note, right? Embedding a Resource in a note requires the use of the <en-media> element, which is part of ENML. A Resource embedded in an ENML document might look something like this:
<en-media type='image/jpg' hash='md5-of-file' />
Image and PDF Resources
The following MIME types can be displayed inline within the body of a note:
image/gif
image/jpeg
image/png
application/pdf
When we include one of the above MIME types as a Resource in our note, we can (optionally) include width and height attributes in the <en-media> element:
<en-media type='image/jpg' hash='md5-of-file' width='250' height='200' />
Otherwise, the implementation is the same as described above.
Audio Resources
The MIME types supported for audio Resources are:
audio/wav
audio/mpeg
audio/amr
When one of these file types is found in the type attribute of an <en-media> element, some Evernote clients will display an embedded audio player and allow playback of the file without leaving the app. The ENML syntax for audio Resources is the same as for all others; no special attributes or tags are required.
All Other Resources
Resources that aren’t images or audio files whose formats appear in the previous two sections will be displayed using what’s called “attachment view” (as opposed to “inline view”). This means that the attachment will appear as a small file icon in the body of the note. When the user clicks/taps the file icon, the file will be opened using whichever application the operating system thinks is the correct option for that file. In other words, Evernote itself won’t try to open the file.
Here’s the same makeNote function we defined earlier, augmented to allow the attachment of Resources:
I managed to piece together how to attach a new PDF file to an Evernotenote using their Python API, so I thought it might be useful to have apost that has all of this information together in one place. I've puttogether a complete example that will:
Authenticate to Evernote using a developer token (Oauth2 is a topicfor another day)
Check if a notebook exists; if not, it will create it for you.
Create a new note in the notebook
Attach a PDF file to that note (including calculating the necessaryMD5 hash)
Upload the new note
The complete file is shown at the end of this post, and I'll go througheach function separately in the next sections.
1 Imports
Here's the complete set of imports that took me a while to track down,even from Evernote's own examples:
2 Authentication
This sample code demonstrates using the Evernote API from a desktop application that authenticates using username and password. Share improve this answer follow answered Dec 8 '10 at 4:47.
Evernote Java Sample Code by Evernote: The Evernote Java Sample Code by Evernote shows how to make several API calls by using Java. Normally, Evernote requires the use of OAuth authorization, but a developer Token can be used as well. This Sample Code demonstrates a way by which developers can integrate the Evernote API into their applications.
And here's how to do the authentication using a developer token (Go tothe following places to get a token: Sandbox evernote server or Production Evernote server
How To Use Evernote
The important thing is to keep the EvernoteClient object around inself.client, as this will proved the authenticated access to thenote stores.
3 Handle notebooks
The next step is to check whether the required notebook is available,or if we need to make it. See the _check_and_make_notebook function.
We use the get_note_store API call to get all thenotebooks, and return a dict with the notebook name mapping to thenotebook, in function _get_notebooks. Then, if the desirednotebook is present, we update the stack (in Evernote, a notebook can bein a collection called a 'stack' of notebooks) and return the notebookpointer. If not, we create a new notebook using the Types.Notebook()call, and store it using the createNotebook API call in thenote_store.
4 Create the new note with attachment
Next is the real meat of this example, where we create the note withthe attachment:
We create a new note using Types.Note(), and set its containingnotebook using the GUID of the notebook. We then start setting thecontents of the note using the Evernote markup language. All the textand attachment links must be inside the 'en-note' tag. The content isthen built up as follows:
Evernote Api Examples For Software
Tumblr media
Read in the PDF file to attach
Calculate the MD5 hash
Create a new Data container for Evernote and store the hash, size,and data from the file
Create a link to this file to insert into the content of the note
Create a Resource type to hold the PDF Data, and put it intoa Resource list
Append the resource list to the note
Return this newly formed note
5 Uploading the note
The final step is to upload the note:
Tumblr media
0 notes
tak4hir0 · 4 years ago
Link
Deliver Scalable Experiences Without Limits Using Functions We’re proud to launch the Salesforce Functions Beta in our Summer ‘21 release, and we look forward to its GA in our Winter ’22 release. Salesforce Functions is a new service on the Salesforce Platform that enables you to deliver more scalable experiences by extending the data and workflows that you already have, making them more robust with the power of elastic compute and open language flexibility. You can now significantly accelerate developer productivity on trusted, managed Salesforce infrastructure through pre-authenticated and preconfigured access to Salesforce data and integration with low-code tools like Flow. Functions allows developers to write code that implements their business logic, which can then be assembled as building blocks in Flows or integrated with Lightning Web Components. Salesforce Functions amplifies low-code productivity with the power and flexibility of custom software, including access to open language ecosystems of libraries and packages. Let’s take a deeper look into what this actually means, and along the way, we’ll show you the updated Developer Tools experience. What’s new in the Salesforce Functions Beta Higher performance with no limits and elastic scale Build applications faster and without limits for more complex business logic or compute-intensive traffic/request activity. Salesforce Functions retains all the security and compliance you trust Salesforce to provide, so you no longer need to deal with VPNs, security tokens, Cloud IAM, and all the DIY complexity when you go off of the Salesforce Platform. Open languages and framework support in your SFDX project, including Java and Node.js Functions let you program in industry-standard languages, such as Node.js and Java. This brings the expressive power of these languages to your apps, as well as the entire ecosystem of tools, libraries, and developers to accelerate your time to market. Familiar tools and native low code integration Functions are fully integrated into the Salesforce Developer Experience and are invoked directly from Apex, making them easy to add to Flows and the simplest way to add complex business logic to your apps. One CLI for development The Salesforce CLI is being enhanced with a new global executable, sf, that simplifies how you build, manage, and deploy across Salesforce.   Functions use case: running compute heavy and high-performance workloads In this blog post, we’re going to create a Java Function that processes a very large data set. Without Functions, it would be impossible to handle a data set this large in Apex, and many users would have had to implement complex workarounds to remain within their Apex limits. With Functions, you can overcome these kinds of computational limitations. In this example, the Function loads the complete six-thousand-record data set into memory. In the following example, we will use Functions to find a code school that is closest to a specific geographic point. It will also iterate over the data set to calculate the distance from a point of origin, sorting the results by distance, and then returning the ones that are closer to the provided location. This can be done in a few simple steps: Write a Function in an SFDX project Run and debug your Function locally to validate logic Deploy the Function to a Salesforce Org Integrate with low code: invoke the Function through Apex Done – you’ve leveraged the compute capabilities from declarative tools. Functions can be written in a Salesforce DX project by using the Salesforce CLI or Visual Studio Code editor with the Salesforce Extension Pack. To create a project with this new command structure using the Salesforce CLI, run: $ sfdx generate:project -n sfdx_functions_project The Visual Studio Code editor with the Salesforce Extension Pack will create a project with the necessary files to start developing for the Salesforce Platform. After creating the project, we can start writing our Functions, by using either Java or JavaScript. Let’s generate the processlargedata function in Java with the Salesforce CLI: $ sfdx generate:function -n processlargedata -l java Or using the Visual Studio Code SFDX: Create Function command: Generate a Function from Visual Studio Code This will generate a Java project under the functions folder with all the necessary files to write your Function and run tests locally. Let’s update the auto-generated Function with the use case we described above. The full source code for this project in the Functions Recipes Sample Application is available on Github.com. { school.setDistance( distance( latitudeSt, longitudeSt, school.getLatitude(), school.getLongitude())); return school; }) .sorted(Comparator.comparingDouble(School::getDistance)) .limit(length) .collect(Collectors.toList()); LOGGER.info("Function successfully filtered {} schools", schools.size()); return new FunctionOutput(schools); } // ... A Java Salesforce Function receives two parameters: an InvocationEvent that contains the input payload of the Function the Context, which has access to the authenticated Salesforce Org and the SDK. (Note: Node.js Functions contains a 3rd parameter Logger, which is used for logging operations). This ProcessLargeDataFunction receives a JSON payload with latitude, longitude, and length, and returns a list of the nearest schools to that starting point specified in the input payload. Now, let’s see how can we run this Function locally. Running your first Function A Salesforce Function can be executed locally by using the CLI, which is a useful way to develop and test your Function without deploying it to a Salesforce Org. Local execution can be also integrated with an authenticated Salesforce Org when doing the invocation. You can start this Function locally by running: $ sfdx run:function:start Or by using the Visual Studio Code SFDX: Start Function command: Start a Function from Visual Studio Code This will build and run the Function locally, and it will be ready to start receiving invocation requests. A Function running locally from Visual Studio Code Now that our Function is running locally, we will use a JSON payload to invoke the Function. Let’s create a payload.json in the function folder with the following information: { "latitude": "36.169090", "longitude": "-115.140579", "length": 5 } This payload information represents the point of origin and the number of results it will return. It will be received by the Function in the InvocationEvent object. You can invoke the Function with this input payload from the CLI by running: $ sfdx run:function --url=http://localhost:8080 [email protected] Or, you can do this from Visual Studio Code by opening the payload.json file, and clicking on the Invoke CodeLens action: Invoking a Function from Visual Studio Code with CodeLens You have seen how to generate, run, and invoke your first Salesforce Function using the Salesforce Developer Tools. Now it is time to connect to a Salesforce Organization, create a compute environment, and deploy the Function. Deploying your first Function We have been able to run our Function locally thanks to the Salesforce Developer Tools, but the real power of Salesforce Functions comes when they are running in our serverless compute environment. Let’s deploy our Function to a Salesforce Organization. To do that, we need to create a Compute Environment and connect it to an Org by running: $ sfdx env:create:compute -o connected_org_alias -a compute_env_alias Then, we need to deploy our Salesforce project and Functions. The upcoming sf CLI will allow you to deploy your project metadata along with the Function in a single command. But until then, we have to do that using sfdx in two steps: $ sfdx force:source:push $ sfdx project:deploy:functions -o connected_org_alias Now that our project is deployed, we can invoke the Function from Apex by using the new Function class: functions.Function fn = functions.Function.get('sfdx_functions_project.processlargedata'); functions.FunctionInvocation invocation = fn.invoke('{"latitude": "36.169090", "longitude": "-115.140579", "length": 5}'); String jsonResponse = invocation.getResponse(); System.debug('Got response' + jsonResponse); Triggering a Function with Apex from the Developer Console Integrating your Function with low-code tools Now that our Function can be invoked through Apex, we can integrate it with a Flow or Lightning Web Component. Let’s create an Apex class, FindCodeSchools.cls, that invokes the ProcessLargeData Function from a Flow. The full source code for this project in the Functions Recipes Sample Application repo is available on Github.com. input) { Input payload = input.get(0); // Get a Reference of the ProcessLargeData Function functions.Function fn = functions.Function.get( 'sfdx_functions_project.processlargedata' ); // Invoke the ProcessLargeData Function functions.FunctionInvocation invocation = fn.invoke( JSON.serialize(payload) ); String response = invocation.getResponse(); // Serialize the Response into an Object Output output = (Output) JSON.deserialize(response, Output.class); return output.schools; } // ... } With this Apex class with an @InvocableMethod, we will create a new Flow that triggers this method as an Apex action and use the output as we see fit. You can also trigger the Function from an LWC component by using the @AuraEnabled annotation. Invoke the FindSchools Apex Method from a Flow As you can see below, we seamlessly integrate the power of the compute capabilities of Salesforce Functions with the low-code simplicity of Flow. Flow integrated with a Salesforce Function Learn more We’re excited to see what you build using Salesforce Functions. Please nominate yourself for the Invite Beta. About the authors Julián Duque is a Lead Developer Advocate at Salesforce. Connect with him on Twitter @julian_duque. Khushboo Goel is a Sr. Product Marketing Manager at Salesforce. Connect with her on Twitter @kgoel31.
0 notes
psychicanchortimemachine · 4 years ago
Text
Solving Common Cross-Platform Issues When Working With Flutter
When mistreatment cross-platform frameworks, folks may forget the nuances of every of the platforms they need their code to run on. This text aims to handle that.
Specifically, people sometimes confuse it with the older Web-based mobile (and desktop) cross-platform frameworks, which basically were just Web pages running within browsers running within a wrapper app.
That was truly cross-platform in the sense that the interfaces were the same anyway because you only had access to the interfaces normally accessible on the Web.
Flutter isn’t that, though: it runs natively on each platform, and it means each app runs just like it would run if it were written in Java/Kotlin or Objective-C/Swift on Android and iOS, pretty much. You need to know that because this implies that you need to take care of the many differences between these very diverse platforms.
Example 1: Storage
I recently wrote on my diary concerning the necessity for a special approach to storing JWTs in net apps compared to mobile apps. That is due to the various nature of the platforms’ storage choices, and therefore the got to recognize every and their native development tools.
WEB
When you write a Web app, the storage options you have are:
1. Downloading/uploading files to/from disk, which requires user interaction and is therefore only suitable for files meant to be read or created by the user.
2. Using cookies, which may or may not be accessible from JS (depending on whether or not they’re httpOnly) and are automatically sent along with requests to a given domain and saved when they come as part of a response.
3. Using JS localStorage and sessionStorage, accessible by any JS on the website, but only from JS that is part of the pages of that website.
MOBILE
The situation when it comes to mobile apps is completely different. The storage options are the following:
1. Local app documents or cache storage, accessible by that app.
2. Other local storage paths for user-created/readable files.
3. NSUserDefaults and SharedPreferences respectively on iOS and Android for key-value storage.
4. Keychain on iOS and KeyStore on Android for secure storage of, respectively, any data and cryptographic keys.
If you don’t recognize that, you’re getting to build a multitude of your implementations as a result of you would like to understand what storage answer you’re truly exploitation and what the benefits and downsides area unit.
CROSS-PLATFORM SOLUTIONS: AN INITIAL APPROACH
Using the Flutter shared_preferences package uses localStorage on the Web, SharedPreferences on Android and NSUserDefaults on iOS. Those have utterly completely different implications for your app, particularly if you’re storing sensitive info like session tokens: localStorage are often scan by the shopper, thus it’s a tangle if you’re prone to XSS. although mobile apps aren’t very prone to XSS, SharedPreferences and NSUserDefaults don't seem to be secure storage ways as a result of they will be compromised on the shopper facet since they're not secure storage and not encrypted.  That’s as a result of they're meant for user preferences, as mentioned here within the case of iOS and here within the robot documentation once talking concerning the protection library that is meant to produce wrappers to the SharedPreferences specifically to inscribe the info before storing it.
SECURE STORAGE ON MOBILE
The only secure storage solutions on mobile are Keychain and KeyStore on iOS and Android respectively, whereas there is no secure storage on the Web. The Keychain and KeyStore area unit terribly completely different in nature, though: Keychain could be a generic credentials storage resolution, whereas the KeyStore is employed to store (and will generate) science keys, either stellate keys or public/private keys.
This means that if, for example, you would like to store a session token, on iOS you'll be able to let the OS manage the coding half and simply send your token to the Keychain, whereas on humanoid it’s a small amount a lot of of a manual expertise as a result of you would like to get (not hard-code, that’s bad) a key, use it to cypher the token, store the encrypted token in SharedPreferences and store the key within the KeyStore. There area unit completely different approaches to it, as area unit most things in security, however the only is perhaps to use stellate coding, as there's no want for public key cryptography since your app each encrypts and decrypts the token. Obviously, you don’t have to be compelled to write mobile platform-specific code that will all of that, as  there is a Flutter plugin that does all of that, for instance.
THE LACK OF SECURE STORAGE ON THE WEB
That was, actually, the rationale that compelled ME to put in writing this post. I wrote regarding exploitation that package to store JWT on mobile apps and other people wished the net version of that however, as I said, there's no secure storage on the net. It doesn’t exist. Does that mean your JWT must be get in the open? No, not at all. you'll be able to use httpOnly cookies, can’t you? Those area unitn’t accessible by JS and are sent solely to your server. the problem thereupon is that they’re continuously sent to your server, notwithstanding one amongst your users clicks on a GET request address on somebody else’s web site which GET request has aspect effects you or your user won’t like. This really works for different request varieties moreover, it’s simply a lot of sophisticated. It’s referred to as Cross-Site Request Forgery and you don’t wish that.  It’s among the net security threats mentioned in Mozilla’s MDN docs, wherever you'll be able to notice a a lot of complete rationalization. There area unit interference strategies. the foremost common one has 2 tokens, actually: one amongst them aiming to the shopper as Associate in Nursing httpOnly cookie, the opposite as a part of the response.  The latter must be hold on in localStorage and not in cookies as a result of we have a tendency to don’t wish it to be sent mechanically to the server.
SOLVING BOTH
What if you have both a mobile app and a Web app? That can be dealt with in one of two ways:
1. Use the same backend endpoint, but manually get and send the cookies using the cookie-related HTTP headers;
2. Create a separate non-Web backend endpoint that generates different token than either token used by the Web app and then allow for regular JWT authorization if the client is able to provide the mobile-only token.
Running Different Code On Different Platforms
Now, let’s see how we can run different code on different platforms in order to be able to compensate for the differences.
CREATING A FLUTTER PLUGIN
Especially to unravel the matter of storage, a technique you'll do this is with a plugin package: plugins offer a typical Dart interface and might run totally different code on different platforms, together with native platform-specific Kotlin/Java or Swift/Objective-C code. Developing packages and plugins is quite complicated, however it’s explained in several places on the net et al. (for example in Flutter books), together with the official Flutter documentation. For mobile platforms, for example, there already may be a secure storage plugin, and that’s flutter_secure_storage, that you'll notice associate example of usage here, however that doesn’t work on the net, as an example.
On the opposite hand, for easy key-value storage that additionally works on the net, there’s a cross-platform Google-developed first-party plugin package known as shared_preferences, that incorporates a Web-specific part known as shared_preferences_web that uses NSUserDefaults, SharedPreferences or localStorage reckoning on the platform.
TARGETPLATFORM ON FLUTTER
After importing package:flutter/foundation.dart, you can compare Theme.of(context).platform to the values:
TargetPlatform.android
TargetPlatform.iOS
TargetPlatform.linux
TargetPlatform.windows
TargetPlatform.macOS
TargetPlatform.fuchsia
and write your functions so that, for each platform you want to support, they do the appropriate thing. This will come especially useful for the next example of platform difference, and that is differences in how widgets are displayed on different platforms.
For that use case, in particular, there is also a reasonably popular flutter_platform_widgets plugin, which simplifies the development of platform-aware widgets.
Example 2: Differences In How The Same Widget Is Displayed
You can’t simply write cross-platform code and fake a browser, a phone, a computer, and a smartwatch area unit a similar factor — unless you wish your humanoid and iOS app to be a WebView and your desktop app to be designed with lepton.
There area unit many reasons to not try this, and it’s not the purpose of this piece to convert you to use frameworks like Flutter instead that keep your app native, with all the performance and user expertise blessings that go with it, whereas permitting you to jot down code that's progressing to be a similar for all platforms most of the time.
That requires care and a focus, though, and a minimum of a basic data of the platforms you wish to support, their actual native genus Apis, and every one of that.
React Native users have to be compelled to pay even additional attention thereto as a result of that framework uses the inherent OS widgets, thus you really have to be compelled to pay even additional attention to however the app appearance by testing it extensively on each platforms, while not having the ability to modify between iOS and Material device on the fly like it’s potential with Flutter..
WHAT CHANGES WITHOUT YOUR REQUEST
There are some aspects of the UI of your app that are automatically changed when you switch platforms. This section also mentions what changes between Flutter and React Native in this respect.
Between Android And iOS (Flutter)
Flutter is capable of rendering Material widgets on iOS (and Cupertino (iOS-like) widgets on Android), however what it DOESN’T do is show precisely the same factor on robot and iOS: Material theming particularly adapts to the conventions of every platform.
For instance, navigation animations and transitions and default fonts area unit completely different, however those don’t impact your app that abundant. What might have an effect on a number of your decisions once it involves aesthetics or wife is that the indisputable fact that some static components conjointly modification.
Specifically, some icons modification between the 2 platforms, app bar titles area unit within the middle on iOS and on the left on robot (on the left of the on the market area just in case there's a back button or the button to open a Drawer (explained here within the Material style pointers and conjointly called a hamburger menu). Here’s what a fabric app with a Drawer feels like on Android:
And what the same, very simple, Material app looks like on iOS:
Between Mobile and Web and With Screen Notches (Flutter)
On the online there's a small amount of a unique state of affairs, as mentioned conjointly during this Smashing article regarding Responsive net Development with Flutter: specifically, additionally to having to optimize for larger screens and account for the means folks expect to navigate through your web site — that is that the main focus of that article — you have got to stress regarding the very fact that generally widgets square measure placed outside of the browser window.
Also, some phones have notches within the high a part of their screen or different impediments to the proper viewing of your app attributable to some form of obstruction. Both of those issues may be avoided by wrapping your conveniences during a SafeArea widget, that may be a explicit reasonably cushioning convenience that makes certain your widgets comprise an area wherever they will really be displayed empty preventive the users’ ability to envision them, be it a hardware or code constraint.
IN REACT NATIVE
React Native needs far more attention and a way deeper information of every platform, additionally to requiring you to run the iOS machine furthermore because the mechanical man human at the terribly least so as to be able to check your app on each platforms: it’s not identical and it converts its JavaScript UI parts to platform-specific widgets.
In alternative words, your React Native apps can invariably seem like iOS — with Cupertino UI parts as they're generally known as — and your mechanical man apps can invariably seem like regular Material style mechanical man apps as a result of it’s victimization the platform’s widgets. The distinction here is that Flutter renders its widgets with its own low-level rendering engine, which implies you'll be able to check each app versions on one platform.
Getting Around That Issue
The Other Side: Using The Wrong Widgets For The Right Reasons
But that also means that you can do most of your Flutter development on a Linux or Windows workstation without sacrificing the experience of your iOS users, and then just build the app for the other platform and not have to worry about thoroughly testing it.
Next Steps Cross-platform frameworks are awesome, but they shift responsibility to you, the developer, to understand how each platform works and how to make sure your app adapts and is pleasant to use for your users. Other small things to consider may be, for example, using different descriptions for what might be in essence the same thing if there are different conventions on different platforms.It’s great to not have to build the two (or more) apps separately using different languages, but you still need to keep in mind you are, in essence, building more than one app and that requires thinking about each of the apps you are building.
We will be happy to answer your questions on designing, developing, and deploying comprehensive enterprise web, mobile apps and customized software solutions that best fit your organization needs. As a reputed Software Solutions Developer we have expertise in providing dedicated remote and outsourced technical resources for software services at very nominal cost. Besides experts in full stacks We also build web solutions, mobile apps and work on system integration, performance enhancement, cloud migrations and big data analytics. Don’t hesitate to
get in touch with us!
0 notes
lakhwanabhishek · 4 years ago
Text
Solving Common Cross-Platform Issues When Working With Flutter
When mistreatment cross-platform frameworks, folks may forget the nuances of every of the platforms they need their code to run on. This text aims to handle that.
Specifically, people sometimes confuse it with the older Web-based mobile (and desktop) cross-platform frameworks, which basically were just Web pages running within browsers running within a wrapper app.
That was truly cross-platform in the sense that the interfaces were the same anyway because you only had access to the interfaces normally accessible on the Web.
Flutter isn’t that, though: it runs natively on each platform, and it means each app runs just like it would run if it were written in Java/Kotlin or Objective-C/Swift on Android and iOS, pretty much. You need to know that because this implies that you need to take care of the many differences between these very diverse platforms.
Example 1: Storage
I recently wrote on my diary concerning the necessity for a special approach to storing JWTs in net apps compared to mobile apps. That is due to the various nature of the platforms’ storage choices, and therefore the got to recognize every and their native development tools.
WEB
When you write a Web app, the storage options you have are:
1. Downloading/uploading files to/from disk, which requires user interaction and is therefore only suitable for files meant to be read or created by the user.
2. Using cookies, which may or may not be accessible from JS (depending on whether or not they’re httpOnly) and are automatically sent along with requests to a given domain and saved when they come as part of a response.
3. Using JS localStorage and sessionStorage, accessible by any JS on the website, but only from JS that is part of the pages of that website.
MOBILE
The situation when it comes to mobile apps is completely different. The storage options are the following:
1. Local app documents or cache storage, accessible by that app.
2. Other local storage paths for user-created/readable files.
3. NSUserDefaults and SharedPreferences respectively on iOS and Android for key-value storage.
4. Keychain on iOS and KeyStore on Android for secure storage of, respectively, any data and cryptographic keys.
If you don’t recognize that, you’re getting to build a multitude of your implementations as a result of you would like to understand what storage answer you’re truly exploitation and what the benefits and downsides area unit.
CROSS-PLATFORM SOLUTIONS: AN INITIAL APPROACH
Using the Flutter shared_preferences package uses localStorage on the Web, SharedPreferences on Android and NSUserDefaults on iOS. Those have utterly completely different implications for your app, particularly if you’re storing sensitive info like session tokens: localStorage are often scan by the shopper, thus it’s a tangle if you’re prone to XSS. although mobile apps aren’t very prone to XSS, SharedPreferences and NSUserDefaults don't seem to be secure storage ways as a result of they will be compromised on the shopper facet since they're not secure storage and not encrypted.  That’s as a result of they're meant for user preferences, as mentioned here within the case of iOS and here within the robot documentation once talking concerning the protection library that is meant to produce wrappers to the SharedPreferences specifically to inscribe the info before storing it.
SECURE STORAGE ON MOBILE
The only secure storage solutions on mobile are Keychain and KeyStore on iOS and Android respectively, whereas there is no secure storage on the Web. The Keychain and KeyStore area unit terribly completely different in nature, though: Keychain could be a generic credentials storage resolution, whereas the KeyStore is employed to store (and will generate) science keys, either stellate keys or public/private keys.
This means that if, for example, you would like to store a session token, on iOS you'll be able to let the OS manage the coding half and simply send your token to the Keychain, whereas on humanoid it’s a small amount a lot of of a manual expertise as a result of you would like to get (not hard-code, that’s bad) a key, use it to cypher the token, store the encrypted token in SharedPreferences and store the key within the KeyStore. There area unit completely different approaches to it, as area unit most things in security, however the only is perhaps to use stellate coding, as there's no want for public key cryptography since your app each encrypts and decrypts the token. Obviously, you don’t have to be compelled to write mobile platform-specific code that will all of that, as  there is a Flutter plugin that does all of that, for instance.
THE LACK OF SECURE STORAGE ON THE WEB
That was, actually, the rationale that compelled ME to put in writing this post. I wrote regarding exploitation that package to store JWT on mobile apps and other people wished the net version of that however, as I said, there's no secure storage on the net. It doesn’t exist. Does that mean your JWT must be get in the open? No, not at all. you'll be able to use httpOnly cookies, can’t you? Those area unitn’t accessible by JS and are sent solely to your server. the problem thereupon is that they’re continuously sent to your server, notwithstanding one amongst your users clicks on a GET request address on somebody else’s web site which GET request has aspect effects you or your user won’t like. This really works for different request varieties moreover, it’s simply a lot of sophisticated. It’s referred to as Cross-Site Request Forgery and you don’t wish that.  It’s among the net security threats mentioned in Mozilla’s MDN docs, wherever you'll be able to notice a a lot of complete rationalization. There area unit interference strategies. the foremost common one has 2 tokens, actually: one amongst them aiming to the shopper as Associate in Nursing httpOnly cookie, the opposite as a part of the response.  The latter must be hold on in localStorage and not in cookies as a result of we have a tendency to don’t wish it to be sent mechanically to the server.
SOLVING BOTH
What if you have both a mobile app and a Web app? That can be dealt with in one of two ways:
1. Use the same backend endpoint, but manually get and send the cookies using the cookie-related HTTP headers;
2. Create a separate non-Web backend endpoint that generates different token than either token used by the Web app and then allow for regular JWT authorization if the client is able to provide the mobile-only token.
Running Different Code On Different Platforms
Now, let’s see how we can run different code on different platforms in order to be able to compensate for the differences.
CREATING A FLUTTER PLUGIN
Especially to unravel the matter of storage, a technique you'll do this is with a plugin package: plugins offer a typical Dart interface and might run totally different code on different platforms, together with native platform-specific Kotlin/Java or Swift/Objective-C code. Developing packages and plugins is quite complicated, however it’s explained in several places on the net et al. (for example in Flutter books), together with the official Flutter documentation. For mobile platforms, for example, there already may be a secure storage plugin, and that’s flutter_secure_storage, that you'll notice associate example of usage here, however that doesn’t work on the net, as an example.
On the opposite hand, for easy key-value storage that additionally works on the net, there’s a cross-platform Google-developed first-party plugin package known as shared_preferences, that incorporates a Web-specific part known as shared_preferences_web that uses NSUserDefaults, SharedPreferences or localStorage reckoning on the platform.
TARGETPLATFORM ON FLUTTER
After importing package:flutter/foundation.dart, you can compare Theme.of(context).platform to the values:
TargetPlatform.android
TargetPlatform.iOS
TargetPlatform.linux
TargetPlatform.windows
TargetPlatform.macOS
TargetPlatform.fuchsia
and write your functions so that, for each platform you want to support, they do the appropriate thing. This will come especially useful for the next example of platform difference, and that is differences in how widgets are displayed on different platforms.
For that use case, in particular, there is also a reasonably popular flutter_platform_widgets plugin, which simplifies the development of platform-aware widgets.
Example 2: Differences In How The Same Widget Is Displayed
You can’t simply write cross-platform code and fake a browser, a phone, a computer, and a smartwatch area unit a similar factor — unless you wish your humanoid and iOS app to be a WebView and your desktop app to be designed with lepton.
There area unit many reasons to not try this, and it’s not the purpose of this piece to convert you to use frameworks like Flutter instead that keep your app native, with all the performance and user expertise blessings that go with it, whereas permitting you to jot down code that's progressing to be a similar for all platforms most of the time.
That requires care and a focus, though, and a minimum of a basic data of the platforms you wish to support, their actual native genus Apis, and every one of that.
React Native users have to be compelled to pay even additional attention thereto as a result of that framework uses the inherent OS widgets, thus you really have to be compelled to pay even additional attention to however the app appearance by testing it extensively on each platforms, while not having the ability to modify between iOS and Material device on the fly like it’s potential with Flutter..
WHAT CHANGES WITHOUT YOUR REQUEST
There are some aspects of the UI of your app that are automatically changed when you switch platforms. This section also mentions what changes between Flutter and React Native in this respect.
Between Android And iOS (Flutter)
Flutter is capable of rendering Material widgets on iOS (and Cupertino (iOS-like) widgets on Android), however what it DOESN’T do is show precisely the same factor on robot and iOS: Material theming particularly adapts to the conventions of every platform.
For instance, navigation animations and transitions and default fonts area unit completely different, however those don’t impact your app that abundant. What might have an effect on a number of your decisions once it involves aesthetics or wife is that the indisputable fact that some static components conjointly modification.
Specifically, some icons modification between the 2 platforms, app bar titles area unit within the middle on iOS and on the left on robot (on the left of the on the market area just in case there's a back button or the button to open a Drawer (explained here within the Material style pointers and conjointly called a hamburger menu). Here’s what a fabric app with a Drawer feels like on Android:
And what the same, very simple, Material app looks like on iOS:
Between Mobile and Web and With Screen Notches (Flutter)
On the online there's a small amount of a unique state of affairs, as mentioned conjointly during this Smashing article regarding Responsive net Development with Flutter: specifically, additionally to having to optimize for larger screens and account for the means folks expect to navigate through your web site — that is that the main focus of that article — you have got to stress regarding the very fact that generally widgets square measure placed outside of the browser window.
Also, some phones have notches within the high a part of their screen or different impediments to the proper viewing of your app attributable to some form of obstruction. Both of those issues may be avoided by wrapping your conveniences during a SafeArea widget, that may be a explicit reasonably cushioning convenience that makes certain your widgets comprise an area wherever they will really be displayed empty preventive the users’ ability to envision them, be it a hardware or code constraint.
IN REACT NATIVE
React Native needs far more attention and a way deeper information of every platform, additionally to requiring you to run the iOS machine furthermore because the mechanical man human at the terribly least so as to be able to check your app on each platforms: it’s not identical and it converts its JavaScript UI parts to platform-specific widgets.
In alternative words, your React Native apps can invariably seem like iOS — with Cupertino UI parts as they're generally known as — and your mechanical man apps can invariably seem like regular Material style mechanical man apps as a result of it’s victimization the platform’s widgets. The distinction here is that Flutter renders its widgets with its own low-level rendering engine, which implies you'll be able to check each app versions on one platform.
Getting Around That Issue
The Other Side: Using The Wrong Widgets For The Right Reasons
But that also means that you can do most of your Flutter development on a Linux or Windows workstation without sacrificing the experience of your iOS users, and then just build the app for the other platform and not have to worry about thoroughly testing it.
Next Steps Cross-platform frameworks are awesome, but they shift responsibility to you, the developer, to understand how each platform works and how to make sure your app adapts and is pleasant to use for your users. Other small things to consider may be, for example, using different descriptions for what might be in essence the same thing if there are different conventions on different platforms.It’s great to not have to build the two (or more) apps separately using different languages, but you still need to keep in mind you are, in essence, building more than one app and that requires thinking about each of the apps you are building.
We will be happy to answer your questions on designing, developing, and deploying comprehensive enterprise web, mobile apps and customized software solutions that best fit your organization needs. As a reputed Software Solutions Developer we have expertise in providing dedicated remote and outsourced technical resources for software services at very nominal cost. Besides experts in full stacks We also build web solutions, mobile apps and work on system integration, performance enhancement, cloud migrations and big data analytics. Don’t hesitate to
get in touch with us!
#b2b ecommerce
#b2bsales
#b2b seo
#b2bservices
#Ecommerce
0 notes
secretcupcakesublime · 4 years ago
Text
Solving Common Cross-Platform Issues When Working With Flutter
When mistreatment cross-platform frameworks, folks may forget the nuances of every of the platforms they need their code to run on. This text aims to handle that.
Specifically, people sometimes confuse it with the older Web-based mobile (and desktop) cross-platform frameworks, which basically were just Web pages running within browsers running within a wrapper app.
That was truly cross-platform in the sense that the interfaces were the same anyway because you only had access to the interfaces normally accessible on the Web.
Flutter isn’t that, though: it runs natively on each platform, and it means each app runs just like it would run if it were written in Java/Kotlin or Objective-C/Swift on Android and iOS, pretty much. You need to know that because this implies that you need to take care of the many differences between these very diverse platforms.
Example 1: Storage
I recently wrote on my diary concerning the necessity for a special approach to storing JWTs in net apps compared to mobile apps. That is due to the various nature of the platforms’ storage choices, and therefore the got to recognize every and their native development tools.
WEB
When you write a Web app, the storage options you have are:
1. Downloading/uploading files to/from disk, which requires user interaction and is therefore only suitable for files meant to be read or created by the user.
2. Using cookies, which may or may not be accessible from JS (depending on whether or not they’re httpOnly) and are automatically sent along with requests to a given domain and saved when they come as part of a response.
3. Using JS localStorage and sessionStorage, accessible by any JS on the website, but only from JS that is part of the pages of that website.
MOBILE
The situation when it comes to mobile apps is completely different. The storage options are the following:
1. Local app documents or cache storage, accessible by that app.
2. Other local storage paths for user-created/readable files.
3. NSUserDefaults and SharedPreferences respectively on iOS and Android for key-value storage.
4. Keychain on iOS and KeyStore on Android for secure storage of, respectively, any data and cryptographic keys.
If you don’t recognize that, you’re getting to build a multitude of your implementations as a result of you would like to understand what storage answer you’re truly exploitation and what the benefits and downsides area unit.
CROSS-PLATFORM SOLUTIONS: AN INITIAL APPROACH
Using the Flutter shared_preferences package uses localStorage on the Web, SharedPreferences on Android and NSUserDefaults on iOS. Those have utterly completely different implications for your app, particularly if you’re storing sensitive info like session tokens: localStorage are often scan by the shopper, thus it’s a tangle if you’re prone to XSS. although mobile apps aren’t very prone to XSS, SharedPreferences and NSUserDefaults don't seem to be secure storage ways as a result of they will be compromised on the shopper facet since they're not secure storage and not encrypted.  That’s as a result of they're meant for user preferences, as mentioned here within the case of iOS and here within the robot documentation once talking concerning the protection library that is meant to produce wrappers to the SharedPreferences specifically to inscribe the info before storing it.
SECURE STORAGE ON MOBILE
The only secure storage solutions on mobile are Keychain and KeyStore on iOS and Android respectively, whereas there is no secure storage on the Web. The Keychain and KeyStore area unit terribly completely different in nature, though: Keychain could be a generic credentials storage resolution, whereas the KeyStore is employed to store (and will generate) science keys, either stellate keys or public/private keys.
This means that if, for example, you would like to store a session token, on iOS you'll be able to let the OS manage the coding half and simply send your token to the Keychain, whereas on humanoid it’s a small amount a lot of of a manual expertise as a result of you would like to get (not hard-code, that’s bad) a key, use it to cypher the token, store the encrypted token in SharedPreferences and store the key within the KeyStore. There area unit completely different approaches to it, as area unit most things in security, however the only is perhaps to use stellate coding, as there's no want for public key cryptography since your app each encrypts and decrypts the token. Obviously, you don’t have to be compelled to write mobile platform-specific code that will all of that, as  there is a Flutter plugin that does all of that, for instance.
THE LACK OF SECURE STORAGE ON THE WEB
That was, actually, the rationale that compelled ME to put in writing this post. I wrote regarding exploitation that package to store JWT on mobile apps and other people wished the net version of that however, as I said, there's no secure storage on the net. It doesn’t exist. Does that mean your JWT must be get in the open? No, not at all. you'll be able to use httpOnly cookies, can’t you? Those area unitn’t accessible by JS and are sent solely to your server. the problem thereupon is that they’re continuously sent to your server, notwithstanding one amongst your users clicks on a GET request address on somebody else’s web site which GET request has aspect effects you or your user won’t like. This really works for different request varieties moreover, it’s simply a lot of sophisticated. It’s referred to as Cross-Site Request Forgery and you don’t wish that.  It’s among the net security threats mentioned in Mozilla’s MDN docs, wherever you'll be able to notice a a lot of complete rationalization. There area unit interference strategies. the foremost common one has 2 tokens, actually: one amongst them aiming to the shopper as Associate in Nursing httpOnly cookie, the opposite as a part of the response.  The latter must be hold on in localStorage and not in cookies as a result of we have a tendency to don’t wish it to be sent mechanically to the server.
SOLVING BOTH
What if you have both a mobile app and a Web app? That can be dealt with in one of two ways:
1. Use the same backend endpoint, but manually get and send the cookies using the cookie-related HTTP headers;
2. Create a separate non-Web backend endpoint that generates different token than either token used by the Web app and then allow for regular JWT authorization if the client is able to provide the mobile-only token.
Running Different Code On Different Platforms
Now, let’s see how we can run different code on different platforms in order to be able to compensate for the differences.
CREATING A FLUTTER PLUGIN
Especially to unravel the matter of storage, a technique you'll do this is with a plugin package: plugins offer a typical Dart interface and might run totally different code on different platforms, together with native platform-specific Kotlin/Java or Swift/Objective-C code. Developing packages and plugins is quite complicated, however it’s explained in several places on the net et al. (for example in Flutter books), together with the official Flutter documentation. For mobile platforms, for example, there already may be a secure storage plugin, and that’s flutter_secure_storage, that you'll notice associate example of usage here, however that doesn’t work on the net, as an example.
On the opposite hand, for easy key-value storage that additionally works on the net, there’s a cross-platform Google-developed first-party plugin package known as shared_preferences, that incorporates a Web-specific part known as shared_preferences_web that uses NSUserDefaults, SharedPreferences or localStorage reckoning on the platform.
TARGETPLATFORM ON FLUTTER
After importing package:flutter/foundation.dart, you can compare Theme.of(context).platform to the values:
TargetPlatform.android
TargetPlatform.iOS
TargetPlatform.linux
TargetPlatform.windows
TargetPlatform.macOS
TargetPlatform.fuchsia
and write your functions so that, for each platform you want to support, they do the appropriate thing. This will come especially useful for the next example of platform difference, and that is differences in how widgets are displayed on different platforms.
For that use case, in particular, there is also a reasonably popular flutter_platform_widgets plugin, which simplifies the development of platform-aware widgets.
Example 2: Differences In How The Same Widget Is Displayed
You can’t simply write cross-platform code and fake a browser, a phone, a computer, and a smartwatch area unit a similar factor — unless you wish your humanoid and iOS app to be a WebView and your desktop app to be designed with lepton.
There area unit many reasons to not try this, and it’s not the purpose of this piece to convert you to use frameworks like Flutter instead that keep your app native, with all the performance and user expertise blessings that go with it, whereas permitting you to jot down code that's progressing to be a similar for all platforms most of the time.
That requires care and a focus, though, and a minimum of a basic data of the platforms you wish to support, their actual native genus Apis, and every one of that.
React Native users have to be compelled to pay even additional attention thereto as a result of that framework uses the inherent OS widgets, thus you really have to be compelled to pay even additional attention to however the app appearance by testing it extensively on each platforms, while not having the ability to modify between iOS and Material device on the fly like it’s potential with Flutter..
WHAT CHANGES WITHOUT YOUR REQUEST
There are some aspects of the UI of your app that are automatically changed when you switch platforms. This section also mentions what changes between Flutter and React Native in this respect.
Between Android And iOS (Flutter)
Flutter is capable of rendering Material widgets on iOS (and Cupertino (iOS-like) widgets on Android), however what it DOESN’T do is show precisely the same factor on robot and iOS: Material theming particularly adapts to the conventions of every platform.
For instance, navigation animations and transitions and default fonts area unit completely different, however those don’t impact your app that abundant. What might have an effect on a number of your decisions once it involves aesthetics or wife is that the indisputable fact that some static components conjointly modification.
Specifically, some icons modification between the 2 platforms, app bar titles area unit within the middle on iOS and on the left on robot (on the left of the on the market area just in case there's a back button or the button to open a Drawer (explained here within the Material style pointers and conjointly called a hamburger menu). Here’s what a fabric app with a Drawer feels like on Android:
And what the same, very simple, Material app looks like on iOS:
Between Mobile and Web and With Screen Notches (Flutter)
On the online there's a small amount of a unique state of affairs, as mentioned conjointly during this Smashing article regarding Responsive net Development with Flutter: specifically, additionally to having to optimize for larger screens and account for the means folks expect to navigate through your web site — that is that the main focus of that article — you have got to stress regarding the very fact that generally widgets square measure placed outside of the browser window.
Also, some phones have notches within the high a part of their screen or different impediments to the proper viewing of your app attributable to some form of obstruction. Both of those issues may be avoided by wrapping your conveniences during a SafeArea widget, that may be a explicit reasonably cushioning convenience that makes certain your widgets comprise an area wherever they will really be displayed empty preventive the users’ ability to envision them, be it a hardware or code constraint.
IN REACT NATIVE
React Native needs far more attention and a way deeper information of every platform, additionally to requiring you to run the iOS machine furthermore because the mechanical man human at the terribly least so as to be able to check your app on each platforms: it’s not identical and it converts its JavaScript UI parts to platform-specific widgets.
In alternative words, your React Native apps can invariably seem like iOS — with Cupertino UI parts as they're generally known as — and your mechanical man apps can invariably seem like regular Material style mechanical man apps as a result of it’s victimization the platform’s widgets. The distinction here is that Flutter renders its widgets with its own low-level rendering engine, which implies you'll be able to check each app versions on one platform.
Getting Around That Issue
The Other Side: Using The Wrong Widgets For The Right Reasons
But that also means that you can do most of your Flutter development on a Linux or Windows workstation without sacrificing the experience of your iOS users, and then just build the app for the other platform and not have to worry about thoroughly testing it.
Next Steps Cross-platform frameworks are awesome, but they shift responsibility to you, the developer, to understand how each platform works and how to make sure your app adapts and is pleasant to use for your users. Other small things to consider may be, for example, using different descriptions for what might be in essence the same thing if there are different conventions on different platforms.It’s great to not have to build the two (or more) apps separately using different languages, but you still need to keep in mind you are, in essence, building more than one app and that requires thinking about each of the apps you are building.
We will be happy to answer your questions on designing, developing, and deploying comprehensive enterprise web, mobile apps and customized software solutions that best fit your organization needs. As a reputed Software Solutions Developer we have expertise in providing dedicated remote and outsourced technical resources for software services at very nominal cost. Besides experts in full stacks We also build web solutions, mobile apps and work on system integration, performance enhancement, cloud migrations and big data analytics. Don’t hesitate to
get in touch with us!
0 notes
codeavailfan · 5 years ago
Text
Programming Language Help
Programming Language Assignment Help
Can you do my assignment? Programming language assignment is an important service to help you. Programming language is a computing language engraved in the form of coding and decoding to instruct computers. The programming language is also called processed machine language by translators and interpreters to perform the work performed on the computer. We provide programming assignment writing services to students, helping them achieve the grade they are entitled to.
Programming language assignment help students in syntax and semantics, two common programming forms in which the language is subdivided. To be precise, both syntax and semantics are subclassified into the following:
context-free syntax
This gets the order in which the ordered characters i.e. symbols are divided into tokens. For more information on our programming support, get our Assignment Assistance Services.
syntax lexical
It is derived how ordered token phrases are clustered in. To help with programming language assignments, take advantage of our services.
context sensitive syntax
Also known as static semantics, it checks various constraints at compile time, type checking etc. For more information on programming language assignment help, select our services.
Dynamics Semantics
It plans the execution of verified programs. For more information about programming language assignment help, contact our experts.
History Of Programming Language
Authors who help with our online programming language assignment give you complete programming assignment writing services. In the year 1950, the programming language was first developed to instruct the computer. Since then, more than 500 qualified programming languages have developed significantly and it remains a continuous process for designing more advanced forms. The short language proposed by John Mauchli in the year 1951 was different from machine code in various aspects. The shortcode was designed with profound mathematical expressions but was not powerful enough to run as fast as machine code. Autocode is another important computer language developed in the mid-1950s that automatically converts code to machine language using the compiler. Experts who help with our programming language help assignment can highlight the history of the programming language.
Our programming language assignment help also provides knowledge in the stages of programming development. The main models of the programming language were developed between 1960 and 1970.
Array programming introduced by APL that plays a major role in influencing functional programming
The structural process of programming was refined by ALGOL
Object-oriented programming was supported by machine language simala
C is the most popular system programming language developed in 1970
The first language of logic programming is considered prolog which was developed in the year 1972.
Programming language assignment help provides full support on the programming language.
Sample Question & Answer Of Programming Language Assignment Help
question:
Since the development of Plancalukal in the 1940s, a large number of programming languages have been designed and implemented for their own specific problem domains and built with their own design decisions and compromises. For example, there are languages that:? is strongly typed and loosely typed,
Object Orientation / Object Orientation Provide support for abstraction of data types,
Use static or dynamic scoping rules,
Provide memory management (i.e. garbage collection) or give the developer precise control over pile-allocation and recycling,
Provide closures to allow passage around like variables,
Allow easy access to array slices and those that don't
Check the internal accuracy of the data and those that do not,
Provide diverse and comprehensive suites with built-in functionality and diverse limited features,
Use pre-processors and macros for select extension codes or option sources, etc.
north:
Introduction and clarification of language purpose
It is rare that programming language, one of many programming languages since the development of Plankalkul in 1940, has been clearly developed for the problem area of banking. COBOL (Common Business Oriented Language) was used in writing business software until the 1980s when it was replaced by C and C++ programming languages.
Objectives Of Programming Language
Helping language assignment helps students understand the purpose of programming languages:
It helps users communicate with computers by applying instructions through the programming language
To determine the design pattern of the programming language
To evaluate diversions and swaps between different programming language features
The benefits of recent machine languages are determined by comparing them with traditional languages
To observe the pattern of programming associated with different language features.
To study the efficiency of programming languages in the manufacture and development of software. For more information, take the help of our programming language assignments.
Types Of Programming Languages
Our programming language assignment helps experts explain a variety of programming languages. The description of the main programming languages is given below:
C Language
It is considered to be the most popular and general-purpose machine language, which aims to serve as building blocks for various popular programming languages such as JAA, C#, Python, JAVA scripts, etc. C is the effective application of the language to execute the operating. The system and various applications are built in it. For more information on C language, get our C Programming Assignment Assistance service.
Java
It is an object-oriented, concurrent and class-based system programming language that is used for general purpose. It once works on the principle of writing once and running anywhere', which implies that once developed code can run in any platform repeatedly without recompilation. Regardless of any architecture of the computer, the Java application can run in any Java virtual machine (JVM) due to its specific byte compilation. For more information on Java, take the help of programming language assignments
C++
It is a system programming language that has mandatory, general and object-oriented features of programming. C++ is used to design embedded and operating systems in kernels. It is a compiled version of the programming language that can be used across multiple platforms, including servers, desktops, and entertainment software applications. C++ ISO is standardized and its newest version is C#. For more information on C++, get our programming language assignment help.
C#
This object-oriented programming language is compatible with Microsoft.Net's platform. Compatibility of C# with Microsoft. Net enhances the development of portable applications and facilitates users with advanced web services. C# includes SOAP (Simple Object Access Protocol) and XML (Markup Language) to simplify programming without applying additional code in each step. In addition, C# plays an efficient role in introducing advanced services into the industry at relatively low cost. Big brands such as LEAD technologies, component sources, seagate software, apex software use ISO standardized C# applications. Our programming language assignment help explains more about this.
python
It is a high-level general-purpose programming language. The language is designed to simplify the overall application. Unlike Java and C++, the language encourages the implications of readable code and concepts to include fewer code lines. For more information, get our programming language assignment help.
Sql
It is an abbreviation for structured query language considered a language for special purpose programming. It is efficient to process a stream of relational data management systems and manipulate data into the relational database of the management system. In addition, SQL is specific as data definition and data manipulation language, due to relational calculus and in-built configuration of relational algebra. For more information, try our programming language assignment help.
Java Script
It is a scripting language based on prototypes displayed with dynamic and high-class functions. Being an important part of the web browser, the implementation of JavaScript helps to manipulate the browser, conduct asynchronous communication, allow the user to interact with client scripts and change the content of the documents displayed. JavaScript is renowned as a versatile language due to its functional, object-oriented and mandatory programming features. For more information on Java Script, get our programming language assignment help.
Different Levels Of Programming Languages
A programming language is broadly categorized according to its levels. Our programming language assignment help services explain this. The importance of each level is considered in detail below.
1. Micro-code
Each component of the CPU is directed to perform minute scale operation by this machine-specific code
Programmers develop instructions written in micro-code to execute micro-programs
Commonly used in CPU and other processing units such as microcontrollers, channels and disk controllers, processing unit of digital signal and graphics, controller of network interfaces, etc.
Microcode usually converts instructions into machine language and is a feature of high speed memory. For more on microcode, get our programming language assignment help.
2. Machine code
Machine code is a series of instructions executed directly by a computer's CPU
Machine code is relative to the architecture of the computer
Numeric machine code is considered as the hardware-based primitive language of programming that represents a computer program assembled at the lowest level
However, programs that are written directly into numerical machine code lead to problem-centered calculations. Our programming assignment authors can elaborate on this with the help of our programming language assignments.
3. Assembly Language
It usually represents the domain of the low-level programming language
Assembly language is assembled with computer code in computer code
This is different from the many utility systems of the high-level programming language
Instructions are given to low-level machine code or operations
Operations such as symbols, labels and expressions are essentially needed to execute a directive
For the purpose of offering macro instruction operations, macro assemblers represent code as extended
Adjustment of assembly process, creation of programs and debugging assistance are some of the important features that are provided by the assemblers. To help with assembly language, take the help of our programming language assignments.
4. Low-level programming language
It is a type of programming language that has negligible or no abstract with a set of instructions configured in the computer's architecture
Low-level language refers to both assembly language and machine code
However, there is no essence of language with machine language, but related to hardware
Language does not require the use of interpreter or compiler to translate it into machine code
Low-level language written programs are simple with negligible memory footprint and run very quickly
This includes detailed technical details. So, its usefulness is very difficult. For low-level programming language assistance, try our programming language assignment help.
5. High-level programming language
This programming language is strong abstraction with detailed instructions configured in the computer
It is a highly comprehensive and simple process of programming language
High-level language pseudocode as a compiler to translate the language into machine code
high level
Language data relates to item abstracts such as threads, arrays, objects, loops, locks, subroute, Boolean and complex arithmetic expressions, variables, functions, objects, etc.
Compared to low-level language, high-level language emphasizes the optimal efficiency of the program. For the high-level programming language assistant, get our programming language assignment assistant.
Difference Between High Level And Low Level Programming Language
translator
It refers to the translation or conversion of written instructions into machine language before it is executed. Our programming assignment writing services explain translators in more detail.
Translators are broadly classified as three important types.
Assembler
It converts programs written in assembly language to machine code before execution
eclectic
It converts programs written in high-level language to machine code before execution
Interpreters
It directly interprets high-level language instructions and sends them for execution.
Similarities between interpreters and compilers
High-level languages are translated into machine code by both interpreter and compiler
Both identify errors and print it in error messages
Both interpreters and compilers find memory addresses to store data and machine code. Contact us for more information about programming assignment writing services.
Why Writing Programming Language Assignments Are Difficult For Students?
It is clear that students should face problems writing their C programming language assignments if they are not knowledgeable about the basics of programming language. Writing programming language assignments seems difficult for students as they try to directly understand programs and skip the early learning modules of the computer language. Our programming assignment writers from our programming language assignments have to take care of these problems.
The basic but important drawback of students is that they do not focus on key areas of difference between high-level and low-level programming languages. This leads to serious mistakes in their assignments. Students are particularly suggested to seek professional assignment assistance, especially when preparing their programming language assignments. Students can get guidance on each stage of program execution so that it will be interesting and simple. Our programming language assignments help our programming language assignment help you get to such issues.
0 notes
etherecash-blog · 8 years ago
Text
The Byzantium Countdown: What's Left Before Ethereum's Next Fork?
The following significant refresh to ethereum, the world's second biggest blockchain by add up to esteem, is set to go live in under seven days. Some portion of a bigger, multi-part update called Metropolis, the purported "Byzantium" code will be implemented at square 4,370,000 – or in around four days as per current measurements – as a hard fork. A typical (yet dubious) system for overhauling blockchains, this implies the progressions are required to be acknowledged extensively by all partners on the ethereum blockchain. In this light, notwithstanding, it's remarkable that the utilization of this instrument in the past has had blended outcomes for ethereum. To date, the stage has led four hard forks, with just a single bringing about the production of an option blockchain, ethereum great.
Tumblr media
Given the adjustments in Byzantium have been laid out in the ethereum guide as far back as 2015, it's impossible it will demonstrate tricky. With two noteworthy redesigns from Metropolis deferred, Byzantium is maybe best observed as a traditionalist overhaul that will present nine key ethereum change conventions (EIPs) to the stage.
Altogether, the progressions are intended to influence the stage to lighter and speedier to run, enhancing exchange speed, savvy contract security and in the long run maybe, protection. Nonetheless, all things considered, there's still work to be done on the redesign, with different partners now entering the last phases of their arrangements.
Customers
As the move toward Byzantium is dependant on the system hubs refreshing, the principle center in the near future will guarantee the customers that offer programming to hubs are prepared for the redesign. This implies new businesses in charge of administering customers need to guarantee their product really contains the EIPs that implement the Byzantium hard fork. While every customer upholds similar guidelines, they're composed in various programming dialects and upheld by various designer groups.
This is the thing that ethereum has called "customer decent variety," which is planned to take into consideration advancement while holding a steady, unambiguous base convention. All together for the move up to happen reliably over the stage, all ethereum customers must refresh with programming that authorizes the piece number 4,370,000 (this doesn't affect outsider administrations, for example, online wallets, however, and is important for individuals running hubs straightforwardly). The EIPs are coded into the customers nearby a square number, and soon thereafter the Byzantium hard fork will be activated.
Inside the following week, all major ethereum customers should discharge a Byzantium overhaul, with plentiful time for hubs to refresh. In the event that specific hubs get left behind, the blockchain will part, making diverse forms of a similar stage.
Nonetheless, at squeeze time, most seem prepared.
Go ethereum (likewise called Geth) is the most well known ethereum customer, having around 69 percent of all ethereum hubs. A week ago, it discharged a Byzantium-prepared overhaul containing the square number, however, at the season of composing, just about portion of the hubs that run Geth have been refreshed.
The second biggest customer, Parity, discharged a Byzantium-prepared overhaul yesterday, however it was withdrawn after an accord bug was found in a fluff test (a sort of nitty gritty blame examination which includes filling a PC program with diverse information until the point when a shortcoming appears). Another redesign is required to be discharged later today. Of the roughly 35 percent of hubs that keep running on Parity, none of these have been refreshed to authorize the hard fork accurately.
The rest of the hub customers are nearly little, and some have additionally discharged a Byzantium-prepared discharge. Ethereum author Vitalik Buterin's python-based ethereum customer made accessible a refresh at the beginning of today. Additionally, java-based EthereumJ and java content EthereumJS discharged an overhaul before today. The engineers behind Cpp-ethereum say they are as yet taking a shot at the move.
Diggers
Those comfortable with ethereum's guide likely know the convention has since quite a while ago wanted to eliminate its verification of-work agreement component for a more exploratory, and they contend, more libertarian elective called evidence of-stake. That progress, in any case, won't be prepared for Byzantium, however there are a few updates intended to facilitate the possible move.
Most quite maybe is that with Byzantium the mining trouble will be altogether brought down. This implies ethereum exchange time will be speedier, and diggers will be paid less for their endeavors. On ethereum, mineworkers additionally run an ethereum customer, thus should refresh for Byzantium in like manner, which will likewise present critical changes.
The refresh makes square mining speedier, and with a specific end goal to adjust for this, piece rewards for excavators after Byzantium will lessen by 2 ETH, or about $604 as indicated by current measurements. This update has been to a great extent bolstered, however it has been the reason for some debate, driving a few gatherings to undermine to proceed to mine the pre-Byzantium ethereum. Unless these endeavors end up being huge, however, this is probably not going to represent any effect on the trades.
Trades
In the event that everything works out as expected, these new businesses will be unaffected by the Byzantium fork.
Here, be that as it may, it's astute to note past confusions. Ethereum's last major hard fork, a crisis measure because of the disappointment of a noteworthy decentralized application called The DAO caused the sudden production of two contending ether digital forms of money. As a little gathering of clients dismissed the change, they could restart the old blockchain, shaping a venture now known as ethereum exemplary, esteemed at $11.48 as per current measurements.
As said, there are a modest bunch of signs that the Byzantium fork will be antagonistic, albeit none appear to be of specific noteworthiness. A few activities important are those that mean to present new varieties of ethereum, for instance Etherite, which needs to make a form of Byzantium that does not bring down the mining reward. On the off chance that the development picks up help, this could put weight on trades, which have demonstrated a current ability to help resources running on alleged "minority" blockchains as an approach to offer new options for theorists.
Application designers
Applications running on ethereum are additionally far-fetched to keep running into troubles. Fog, the ethereum program for decentralized applications (dapps), naturally moves up to Byzantium once it has been restarted. The same applies for all the dapps on ethereum. Giving the hard fork happens reliably over the hubs, the updates ought to enact in a split second after square number 4,370,000. In any case, there is one noteworthy change that will have a stamped effect to how designers will connect with exchanges on the ethereum blockchain.
Etherecash is Likely to Turn the Game with their Multicrypto Debit Card
The Working of Digital Payments with Etherecash: Explained
4 Reasons Why Etherecash is Great
Etherecash development journey gives a glimpse of future success.
Let’s describe about enabling your Etherecash token for joining on the ethereal blockchain.
3 notes · View notes
voidstarzero · 4 years ago
Text
DPoP with Spring Boot and Spring Security
Solid is an exciting project that I first heard about back in January. Its goal is to help “re-decentralize” the Web by empowering users to control access to their own data. Users set up “pods” to store their data, which applications can securely interact with using the Solid protocol. Furthermore, Solid documents are stored as linked data, which allows applications to interoperate more easily, hopefully leading to less of the platform lock-in that exists with today’s Web.
I’ve been itching to play with this for months, and finally got some free time over the past few weekends to try building a Solid app. Solid's authentication protocol, Solid OIDC, is built on top of regular OIDC with a mechanism called DPoP, or "Demonstration of Proof of Possession". While Spring Security makes it fairly easy to configure OIDC providers and clients, it doesn't yet have out-of-the-box support for DPoP. This post is a rough guide on adding DPoP to a Spring Boot app using Spring Security 5, which gets a lot of the way towards implementing the Solid OIDC flow. The full working example can be found here.
DPoP vs. Bearer Tokens
What's the point of DPoP? I will admit it's taken me a fair amount of reading and re-reading over the past several weeks to feel like I can grasp what DPoP is about. My understanding thus far: If a regular bearer token is stolen, it can potentially be used by a malicious client to impersonate the client that it was intended for. Adding audience information into the token mitigates some of the danger, but also constrains where the token can be used in a way that might be too restrictive. DPoP is instead an example of a "sender-constrained" token pattern, where the access token contains a reference to an ephemeral public key, and every request where it's used must be additionally accompanied by a request-specific token that's signed by the corresponding private key. This proves that the client using the access token also possesses the private key for the token, which at least allows the token to be used with multiple resource servers with less risk of it being misused.
So, the DPoP auth flow differs from Spring's default OAuth2 flow in two ways: the initial token request contains more information than the usual token request; and, each request made by the app needs to create and sign a JWT that will accompany the request in addition to the access token. Let's take a look at how to implement both of these steps.
Overriding the Token Request
In the authorization code grant flow for requesting access tokens, the authorization process is kicked off by the client sending an initial request to the auth server's authorization endpoint. The auth server then responds with a code, which the client includes in a final request to the auth server's token endpoint to obtain its tokens. Solid OIDC recommends using a more secure variation on this exchange called PKCE ("Proof Key for Code Exchange"), which adds a code verifier into the mix; the client generates a code verifier and sends its hash along with the authorization request, and when it makes its token request, it must also include the original code verifier so that the auth server can confirm that it originated the authorization request.
Spring autoconfigures classes that implement both the authorization code grant flow and the PKCE variation, which we can reuse for the first half of our DPoP flow. What we need to customize is the second half -- the token request itself.
To do this we implement the OAuth2AccessTokenResponseClient interface, parameterized with OAuth2AuthorizationCodeGrantRequest since DPoP uses the authorization code grant flow. (For reference, the default implementation provided by Spring can be found in the DefaultAuthorizationCodeTokenResponseClient class.) In the tokenRequest method of our class, we do the following:
retrieve the code verifier generated during the authorization request
retrieve the code received in response to the authorization request
generate an ephemeral key pair, and save it somewhere the app can access it during the lifetime of the session
construct a JWT with request-specific info, and sign it using our generated private key
make a request to the token endpoint using the above data, and return the result as an OAuth2AccessTokenResponse.
Here's the concrete implementation of all of that. We get the various data that we need from the OAuth2AuthorizationCodeGrantRequest object passed to our method. We then call on RequestContextHolder to get the current session ID and use that to save the session keys we generate to a map in the DPoPUtils bean. We create and sign a JWT which goes into the DPoP header, make the token request, and finally convert the response to an OAuth2AccessTokenResponse.
Using the DPoP Access Token
Now, to make authenticated requests to a Solid pod our app will need access to both an Authentication object (provided automatically by Spring) containing the DPoP access token obtained from the above, as well as DPoPUtils for the key pair needed to use the token.
On each request, the application must generate a fresh JWT and place it in a DPoP header as demonstrated by the authHeaders method below:
private fun authHeaders( authToken: String, sessionId: String, method: String, requestURI: String ): HttpHeaders { val headers = HttpHeaders() headers.add("Authorization", "DPoP $authToken") dpopUtils.sessionKey(sessionId)?.let { key -> headers.add("DPoP", dpopUtils.dpopJWT(method, requestURI, key)) } return headers }
The body of the JWT created by DPoPUtils#dpopJWT contains claims that identify the HTTP method and the target URI of the request:
private fun payload(method: String, targetURI: String) : JWTClaimsSet = JWTClaimsSet.Builder() .jwtID(UUID.randomUUID().toString()) .issueTime(Date.from(Instant.now())) .claim("htm", method) .claim("htu", targetURI) .build()
A GET request, for example, would then look something like this:
val headers = authHeaders( authToken, sessionId, "GET", requestURI ) val httpEntity = HttpEntity(headers) val response = restTemplate.exchange( requestURI, HttpMethod.GET, httpEntity, String::class.java )
A couple of last things to note: First, the session ID passed to the above methods is not retrieved from RequestContextHolder as before, but from the Authentication object provided by Spring:
val sessionId = ((authentication as OAuth2AuthenticationToken) .details as WebAuthenticationDetails).sessionId
And second, we want the ephemeral keys we generate during the token request to be removed from DPoPUtils when the session they were created for is destroyed. To accomplish this, we create an HttpSessionListener and override its sessionDestroyed method:
@Component class KeyRemovalSessionListener( private val dPoPUtils: DPoPUtils ) : HttpSessionListener { override fun sessionDestroyed(se: HttpSessionEvent) { val securityContext = se.session .getAttribute("SPRING_SECURITY_CONTEXT") as SecurityContextImpl val webAuthDetails = securityContext.authentication.details as WebAuthenticationDetails val sessionId = webAuthDetails.sessionId dPoPUtils.removeSessionKey(sessionId) } }
This method will be invoked on user logout as well as on session timeout.
0 notes
johnesmithiii · 5 years ago
Text
Noteworthy progress of blockchain games in March: Enjin, Decentraland, The Sandbox, etc.
Enjin Ecological multiple games released public beta, Somium Area VR and The Sandbox held a property auction. Original title: "First Class Monthly Report: Summary of Major Games Progress in March" Author: First Class The field of blockchain games continues to develop. Although the amount of video gaming blockchain games nevertheless ranks first, the general development has passed. The overall game industry provides fresh pursuits and tendencies. Projects and players increasingly worth the playability and Sustainable advancement of the blockchain business. The auction of property and property in virtual reality games is definitely a spot in blockchain games, and the competition has become increasingly fierce. In March, several virtual reality games began the Nth round of property auctions to share the rest of the cakes. For information, please see the breakdown below. Project progress is certainly sorted in order of ranking, and the ranking is based on data from the Coinmarketcap internet site as of March 31, 2020. Enjin Coin (ENJ), #733 Monthly progress Enjin multiverse one player technology fiction adventure video game "Age of Rust" will be released in beta this 30 days; "Hunters of Rio" has started open public beta; "9 Existence Arena" upgrade 0.4 Edition and integrated Enjin wallet; "Dissolution Game" has been released on Steam, but just supports single participant mode. Enjin Platform users used 300,000 ENJs to forge an NFT on March 9th. The NFT can be used to buy tickets to Mars on SpaceX.
Views In February, Enjin System went go on the mainnet, and people can build NFTs or projects. Since forged NFTs could be reduced to ENJ tokens, many people start to make use of ENJ tokens to forge NFTs for entertainment purposes. Before, someone forged an NFT known as "Being truly a King is a great Issue", costing 1,155,777.1 ENJs. With the start of Enjin System, the creation of NFTs has become more diverse. Both games "Age of Rust" and "Dissolution Game" provide different scenarios to enrich an individual experience and satisfy the tastes of different players. They're both popular games in the Enjin ecosystem. The reputation of "9 Existence Arena" can be rated in the forefront of blockchain games. The integration of Enjin wallet makes it easier for users to enter the overall game. If these games can attract numerous new users, as the game property in the Enjin multiverse have got cross-game attributes, various other games in the ecosystem can also benefit from this network impact and get fresh blood. In April, it is planned that the Enjin team will continue its development work. The main contents include upgrading the Enjin wallet and updating the Godot SDK and Java SDK. "Dissolution Game" continues to be quite a distance from the conceived MMO mode. The game group will continue to develop the overall game, fix bugs, and enhance the user experience. Other games in the multiverse ecosystem will still be developed. Decentraland (MANA), #1013 Progress in 30 days Since Decentraland has been opened on February 20th, many reviewers said that the project was tough and there have been many bugs, which was definately not the vision. As constantly, the official continues to be doing development function within an orderly way, adding a research function on the market. The community can be actively building, including DCL Plazas hosting a skill festival, Decentral Games developing a chess picture, and hosting competitions. The areas in the virtual world are progressively opening up. The ecological surrounding project Chain Breakers has undergone major changes, that is one of the biggest game projects in the Decentraland ecosystem. The overall game faced funding issues and advancement bottlenecks simultaneously, and finally made a decision to auction the overall game copyright on March 30.
I believe the group spent lots of time refactoring the SDK in the initial three years of advancement. Although you can find delivery tasks, a lot of basic functions are not yet perfect. Currently, it can just end up being browsed through the web, and the loading period is lengthy. The official roadmap tasks are too detailed and there is no clear delivery period. It is anticipated that it will require a long time to full the essential functions. Based on the DCL blogger, Decentraland happens to be creating a standalone desktop computer client. For games like Decentraland which are less competing and tend to be casual, mobile is even more needed. As the mobile terminal allows players to utilize fragmented time, raise online duration, broaden the target audience, and attract lighting users. Team advancement content needs to be more in line with market needs. In addition, a lot of users stopped accessing the overall game following the event day, and the amount of everyday active users fell to about 10% of the open event. This demonstrates DCL is not enough to depend on the neighborhood to build an interior ecosystem. The stagnant advancement of the overall game Chain Breakers also requires DCL to get new methods to enrich the ecology. Based on the code submission plan within April, the team's recent function targets enhancing Decentraland Explorer. Based on the roadmap, the functions that require to be shipped soon include: redesigning the official website; using different colors to tag the titles of others; adding street names; enhancing the map to a navigational map; using the map for location exchange; the builder can team and operate components. Somium Area VR (CUBE), #No ranking in March. Improvement in March Somium Area released Somium 2.0 on February 20th, and began the second property auction on March 19th, using Dutch auctions, auctioning 25 weekly Lots, the auction lasts 10 days, a total of 250 plenty. The average price of property auctioned in the initial week was 4.4 ETH. Somium Space's scalability option originally used Loom's part chain technology, but now it has switched to Matic technologies. First Class Encyclopedia: Dutch auction, also called "reduced cost auction", is really a special kind of auction. The bidding cost of the auction focus on decreases from high to low until the first bidder responds. If the initial person hasn't finished bidding all the objects, the rest of the objects will still be auctioned at a lower life expectancy cost until all the objects can be purchased. Ultimately, all the targets can be purchased at the cheapest price.
View Somium Space's overall progress is slow. The overall game uses the realization of a 3D virtual globe as its vision, and uses "interpersonal systems" and VR as its major selling points. However, a lot of people currently don't have VR devices, and the overall game experience can't be when compared to same kind of centralized games. Therefore, both of these selling factors are hard to attract numerous new users and investors. Aside from the property auction planned in April, the group hasn't announced other plans yet. The Sandbox (SAND, not yet released) March progress. The Sandbox completed the second round of property auctions in February, and made a decision to start the 3rd round of property auctions on March 31, marketing 12,384 plots at a 20% price cut. Including 2,538 plots of 1x1 plots, 750 plots of 3x3 plots, 50 plots of 6x6 plots, 5 plots of 12x12 plots, and 1 plot of 24x24 plots. The image below exhibits the partners presently known to participate in the 3rd round of property auctions:
The official VoxEdit Beta version of the editor was released in February, and a VoxEdit creation contest happened in March. The creation content could be changed into ERC-1155 NFT for trading.
When it comes to development, five fresh features this month include: adding coordinates to the land; modifying the logo design and name of the real estate; recommending fresh users through individual links to obtain certain benefits; adding a user profile information column; adding a Search engines 3D NFT viewer. When it comes to operations, The Sandbox has generated a cooperative relationship with the role-playing game Crypto Sword & Magic and the card game Neon District, and announced the cooperation with the Ethereum layer-2 expansion solution Matic Network (MATIC) to improve the user's trading experience. The Sandbox also cooperates with the South Korean multi-channel online entertainment company Sandbox Network, which has the correct to publish content linked to The Sandbox video game. When it comes to style, The Sandbox is most like the centralized game "Minecraft". Since February, it provides cooperated with an increase of than 10 blockchain games. Most of the integrated games are competing, with high confrontation, competition and high operability, allowing players to enter an increased degree of flow encounter, which is even more conducive to The Sandbox overcoming normal sandbox games which are highly reliant on user creation Pain points of drive. In April, the look team will auction the land as planned, and more organizations are expected to join. In the roadmap, the target for the initial quarter is: Visual scripting tool Game Maker releases a Beta version to support editing property. The goal for the second quarter would be to release the official version. The visible scripting tool Game Maker happens to be in the Alpha preliminary edition, and the group will continue to develop it. Cryptovoxels (zero token) March progress. This 30 days, Cryptovoxels submitted the code for iOS 1.0 to the App Store. If approved, you can download the iOS edition through TestFlight. Apple mobile phone users can access through the mobile terminal. The overall game also released a new HTML editing user interface, users can easier build scenes. Furthermore, developers want to integrate PICO-8 games. Recently, the project celebration auctioned a batch of property. A complete of 2,795 plots have already been opened.
The opinion is that Cryptovoxels, that is also a virtual reality game, has implemented basic functions such as location transmission and voice chat. When it comes to loading speed, the first degree of virtual actuality games, Cryptovoxels will take less time and energy to load scenes than Decentraland, and you could enter the virtual globe in a couple of seconds. In recent months, Cryptovoxels land costs have got doubled, and property transactions in recent weeks have also surpassed Decentraland, but there's still a huge gap between the final number of users and active users of the former and the latter. In general, the leading position of DCL in virtual reality can't be surpassed very quickly. It is well worth mentioning that the auction cost of Cryptovoxels property is appropriately increased based on the user increment, and Dutch auction is adopted. The benefit of that is that possible users will never be deterred by the high land cost, and the early stage is even more friendly to users who desire to become landlords. It is planned in April that this project will be mainly produced by the founder solely. Based on the information released, the main tasks soon include: if you can find a lot more than 100 online users simultaneously, even more servers will be began; solving the problem of proxy WebSocket connection interruption. Overview Whether centralized or decentralized, the essential appeal of the overall game is certainly: fun. For virtual reality games, it isn't sufficiently to attract investors to buy property. Improving the game's playability and attracting genuine gamers may be the long-expression survival. Furthermore, in neuro-scientific blockchain games, the top effect nevertheless applies. Although the amount of virtual actuality games is massive, how big is the cake is bound. The first few products attract most users and assets, and just the best products will be still left. Next, may enter the phase of fierce competition between virtual actuality games.
0 notes
laurelkrugerr · 5 years ago
Text
Solving Common Cross-Platform Issues When Working With Flutter
About The Author
Flutter and LinUX enthusiast, author of the Programming Flutter book with the Pragmatic Bookshelf. Blogs more, tweets less. More about Carmine …
When using cross-platform frameworks, people might forget the nuances of each of the platforms they want their code to run on. This article aims to address that.
I’ve seen a lot of confusion online regarding Web development with Flutter and, often, it’s sadly for the wrong reasons.
Specifically, people sometimes confuse it with the older Web-based mobile (and desktop) cross-platform frameworks, which basically were just Web pages running within browsers running within a wrapper app.
That was truly cross-platform in the sense that the interfaces were the same anyway because you only had access to the interfaces normally accessible on the Web.
Flutter isn’t that, though: it runs natively on each platform, and it means each app runs just like it would run if it were written in Java/Kotlin or Objective-C/Swift on Android and iOS, pretty much. You need to know that because this implies that you need to take care of the many differences between these very diverse platforms.
In this article, we’re going to see some of those differences and how to overcome them. More specifically, we’re going to talk about storage and UI differences, which are the ones that most often cause confusion to developers when writing Flutter code that they want to be cross-platform.
Example 1: Storage
I recently wrote on my blog about the need for a different approach to storing JWTs in Web apps when compared to mobile apps.
That is because of the different nature of the platforms’ storage options, and the need to know each and their native development tools.
Web
When you write a Web app, the storage options you have are:
downloading/uploading files to/from disk, which requires user interaction and is therefore only suitable for files meant to be read or created by the user;
using cookies, which may or may not be accessible from JS (depending on whether or not they’re httpOnly) and are automatically sent along with requests to a given domain and saved when they come as part of a response;
using JS localStorage and sessionStorage, accessible by any JS on the website, but only from JS that is part of the pages of that website.
Mobile
The situation when it comes to mobile apps is completely different. The storage options are the following:
local app documents or cache storage, accessible by that app;
other local storage paths for user-created/readable files;
NSUserDefaults and SharedPreferences respectively on iOS and Android for key-value storage;
Keychain on iOS and KeyStore on Android for secure storage of, respectively, any data and cryptographic keys.
If you don’t know that, you’re going to make a mess of your implementations because you need to know what storage solution you’re actually using and what the advantages and drawbacks are.
Cross-Platform Solutions: An Initial Approach
Using the Flutter shared_preferences package uses localStorage on the Web, SharedPreferences on Android and NSUserDefaults on iOS. Those have completely different implications for your app, especially if you’re storing sensitive information like session tokens: localStorage can be read by the client, so it’s a problem if you’re vulnerable to XSS. Even though mobile apps aren’t really vulnerable to XSS, SharedPreferences and NSUserDefaults are not secure storage methods because they can be compromised on the client side since they are not secure storage and not encrypted. That’s because they are meant for user preferences, as mentioned here in the case of iOS and here in the Android documentation when talking about the Security library which is designed to provide wrappers to the SharedPreferences specifically to encrypt the data before storing it.
Secure Storage On Mobile
The only secure storage solutions on mobile are Keychain and KeyStore on iOS and Android respectively, whereas there is no secure storage on the Web.
The Keychain and KeyStore are very different in nature, though: Keychain is a generic credentials storage solution, whereas the KeyStore is used to store (and can generate) cryptographic keys, either symmetric keys or public/private keys.
This means that if, for instance, you need to store a session token, on iOS you can let the OS manage the encryption part and just send your token to the Keychain, whereas on Android it’s a bit more of a manual experience because you need to generate (not hard-code, that’s bad) a key, use it to encrypt the token, store the encrypted token in SharedPreferences and store the key in the KeyStore.
There are different approaches to that, as are most things in security, but the simplest is probably to use symmetric encryption, as there is no need for public key cryptography since your app both encrypts and decrypts the token.
Obviously, you don’t need to write mobile platform-specific code that does all of that, as there is a Flutter plugin that does all of that, for instance.
The Lack Of Secure Storage On the Web
That was, actually, the reason that compelled me to write this post. I wrote about using that package to store JWT on mobile apps and people wanted the Web version of that but, as I said, there is no secure storage on the Web. It doesn’t exist.
Does that mean your JWT has to be out in the open?
No, not at all. You can use httpOnly cookies, can’t you? Those aren’t accessible by JS and are sent only to your server. The issue with that is that they’re always sent to your server, even if one of your users clicks on a GET request URL on someone else’s website and that GET request has side effects you or your user won’t like. This actually works for other request types as well, it’s just more complicated. It’s called Cross-Site Request Forgery and you don’t want that. It’s among the web security threats mentioned in Mozilla’s MDN docs, where you can find a more complete explanation.
There are prevention methods. The most common one is having two tokens, actually: one of them getting to the client as an httpOnly cookie, the other as part of the response. The latter has to be stored in localStorage and not in cookies because we don’t want it to be sent automatically to the server.
Solving Both
What if you have both a mobile app and a Web app?
That can be dealt with in one of two ways:
Use the same backend endpoint, but manually get and send the cookies using the cookie-related HTTP headers;
Create a separate non-Web backend endpoint that generates different token than either token used by the Web app and then allow for regular JWT authorization if the client is able to provide the mobile-only token.
Running Different Code On Different Platforms
Now, let’s see how we can run different code on different platforms in order to be able to compensate for the differences.
Creating A Flutter Plugin
Especially to solve the problem of storage, one way you can do that is with a plugin package: plugins provide a common Dart interface and can run different code on different platforms, including native platform-specific Kotlin/Java or Swift/Objective-C code. Developing packages and plugins is rather complex, but it’s explained in many places on the Web and elsewhere (for example in Flutter books), including the official Flutter documentation.
For mobile platforms, for instance, there already is a secure storage plugin, and that’s flutter_secure_storage, for which you can find an example of usage here, but that doesn’t work on the Web, for example.
On the other hand, for simple key-value storage that also works on the web, there’s a cross-platform Google-developed first-party plugin package called shared_preferences, which has a Web-specific component called shared_preferences_web which uses NSUserDefaults, SharedPreferences or localStorage depending on the platform.
TargetPlatform on Flutter
After importing package:flutter/foundation.dart, you can compare Theme.of(context).platform to the values:
TargetPlatform.android
TargetPlatform.iOS
TargetPlatform.linUX
TargetPlatform.windows
TargetPlatform.macOS
TargetPlatform.fuchsia
and write your functions so that, for each platform you want to support, they do the appropriate thing. This will come especially useful for the next example of platform difference, and that is differences in how widgets are displayed on different platforms.
For that use case, in particular, there is also a reasonably popular flutter_platform_widgets plugin, which simplifies the development of platform-aware widgets.
Example 2: Differences In How The Same Widget Is Displayed
You can’t just write cross-platform code and pretend a browser, a phone, a computer, and a smartwatch are the same thing — unless you want your Android and iOS app to be a WebView and your desktop app to be built with Electron. There are plenty of reasons not to do that, and it’s not the point of this piece to convince you to use frameworks like Flutter instead that keep your app native, with all the performance and user experience advantages that come with it, while allowing you to write code that is going to be the same for all platforms most of the time.
That requires care and attention, though, and at least a basic knowledge of the platforms you want to support, their actual native APIs, and all of that. React Native users need to pay even more attention to that because that framework uses the built-in OS widgets, so you actually need to pay even more attention to how the app looks by testing it extensively on both platforms, without being able to switch between iOS and Material widget on the fly like it’s possible with Flutter.
What Changes Without Your Request
There are some aspects of the UI of your app that are automatically changed when you switch platforms. This section also mentions what changes between Flutter and React Native in this respect.
Between Android And iOS (Flutter)
Flutter is capable of rendering Material widgets on iOS (and Cupertino (iOS-like) widgets on Android), but what it DOESN’T do is show exactly the same thing on Android and iOS: Material theming especially adapts to the conventions of each platform.
For instance, navigation animations and transitions and default fonts are different, but those don’t impact your app that much.
What may affect some of your choices when it comes to aesthetics or UX is the fact that some static elements also change. Specifically, some icons change between the two platforms, app bar titles are in the middle on iOS and on the left on Android (on the left of the available space in case there is a back button or the button to open a Drawer (explained here in the Material Design guidelines and also known as a hamburger menu). Here’s what a Material app with a Drawer looks like on Android:
Material app running on Android: the AppBar title is in the left side of the available space. (Large preview)
And what the same, very simple, Material app looks like on iOS:
Material app running on iOS: the AppBar title is in the middle. (Large preview)
Between Mobile and Web and With Screen Notches (Flutter)
On the Web there is a bit of a different situation, as mentioned also in this Smashing article about Responsive Web Development with Flutter: in particular, in addition to having to optimize for bigger screens and account for the way people expect to navigate through your site — which is the main focus of that article — you have to worry about the fact that sometimes widgets are placed outside of the browser window. Also, some phones have notches in the top part of their screen or other impediments to the correct viewing of your app because of some sort of obstruction.
Both of these problems can be avoided by wrapping your widgets in a SafeArea widget, which is a particular kind of padding widget which makes sure your widgets fall into a place where they can actually be displayed without anything impeding the users’ ability to see them, be it a hardware or software constraint.
In React Native
React Native requires much more attention and a much deeper knowledge of each platform, in addition to requiring you to run the iOS Simulator as well as the Android Emulator at the very least in order to be able to test your app on both platforms: it’s not the same and it converts its JavaScript UI elements to platform-specific widgets. In other words, your React Native apps will always look like iOS — with Cupertino UI elements as they are sometimes called — and your Android apps will always look like regular Material Design Android apps because it’s using the platform’s widgets.
The difference here is that Flutter renders its widgets with its own low-level rendering engine, which means you can test both app versions on one platform.
Getting Around That Issue
Unless you’re going for something very specific, your app is supposed to look different on different platforms otherwise some of your users will be unhappy.
Just like you shouldn’t simply ship a mobile app to the web (as I wrote in the aforementioned Smashing post), you shouldn’t ship an app full of Cupertino widgets to Android users, for example, because it’s going to be confusing for the most part. On the other hand, having the chance to actually run an app that has widgets that are meant for another platform allows you to test the app and show it to people in both versions without having to use two devices for that necessarily.
The Other Side: Using The Wrong Widgets For The Right Reasons
But that also means that you can do most of your Flutter development on a LinUX or Windows workstation without sacrificing the experience of your iOS users, and then just build the app for the other platform and not have to worry about thoroughly testing it.
Next Steps
Cross-platform frameworks are awesome, but they shift responsibility to you, the developer, to understand how each platform works and how to make sure your app adapts and is pleasant to use for your users. Other small things to consider may be, for example, using different descriptions for what might be in essence the same thing if there are different conventions on different platforms.
It’s great to not have to build the two (or more) apps separately using different languages, but you still need to keep in mind you are, in essence, building more than one app and that requires thinking about each of the apps you are building.
Further Resources
(ra, yk, il)
Website Design & SEO Delray Beach by DBL07.co
Delray Beach SEO
source http://www.scpie.org/solving-common-cross-platform-issues-when-working-with-flutter/ source https://scpie1.blogspot.com/2020/06/solving-common-cross-platform-issues.html
0 notes
riichardwilson · 5 years ago
Text
Solving Common Cross-Platform Issues When Working With Flutter
About The Author
Flutter and LinUX enthusiast, author of the Programming Flutter book with the Pragmatic Bookshelf. Blogs more, tweets less. More about Carmine …
When using cross-platform frameworks, people might forget the nuances of each of the platforms they want their code to run on. This article aims to address that.
I’ve seen a lot of confusion online regarding Web development with Flutter and, often, it’s sadly for the wrong reasons.
Specifically, people sometimes confuse it with the older Web-based mobile (and desktop) cross-platform frameworks, which basically were just Web pages running within browsers running within a wrapper app.
That was truly cross-platform in the sense that the interfaces were the same anyway because you only had access to the interfaces normally accessible on the Web.
Flutter isn’t that, though: it runs natively on each platform, and it means each app runs just like it would run if it were written in Java/Kotlin or Objective-C/Swift on Android and iOS, pretty much. You need to know that because this implies that you need to take care of the many differences between these very diverse platforms.
In this article, we’re going to see some of those differences and how to overcome them. More specifically, we’re going to talk about storage and UI differences, which are the ones that most often cause confusion to developers when writing Flutter code that they want to be cross-platform.
Example 1: Storage
I recently wrote on my blog about the need for a different approach to storing JWTs in Web apps when compared to mobile apps.
That is because of the different nature of the platforms’ storage options, and the need to know each and their native development tools.
Web
When you write a Web app, the storage options you have are:
downloading/uploading files to/from disk, which requires user interaction and is therefore only suitable for files meant to be read or created by the user;
using cookies, which may or may not be accessible from JS (depending on whether or not they’re httpOnly) and are automatically sent along with requests to a given domain and saved when they come as part of a response;
using JS localStorage and sessionStorage, accessible by any JS on the website, but only from JS that is part of the pages of that website.
Mobile
The situation when it comes to mobile apps is completely different. The storage options are the following:
local app documents or cache storage, accessible by that app;
other local storage paths for user-created/readable files;
NSUserDefaults and SharedPreferences respectively on iOS and Android for key-value storage;
Keychain on iOS and KeyStore on Android for secure storage of, respectively, any data and cryptographic keys.
If you don’t know that, you’re going to make a mess of your implementations because you need to know what storage solution you’re actually using and what the advantages and drawbacks are.
Cross-Platform Solutions: An Initial Approach
Using the Flutter shared_preferences package uses localStorage on the Web, SharedPreferences on Android and NSUserDefaults on iOS. Those have completely different implications for your app, especially if you’re storing sensitive information like session tokens: localStorage can be read by the client, so it’s a problem if you’re vulnerable to XSS. Even though mobile apps aren’t really vulnerable to XSS, SharedPreferences and NSUserDefaults are not secure storage methods because they can be compromised on the client side since they are not secure storage and not encrypted. That’s because they are meant for user preferences, as mentioned here in the case of iOS and here in the Android documentation when talking about the Security library which is designed to provide wrappers to the SharedPreferences specifically to encrypt the data before storing it.
Secure Storage On Mobile
The only secure storage solutions on mobile are Keychain and KeyStore on iOS and Android respectively, whereas there is no secure storage on the Web.
The Keychain and KeyStore are very different in nature, though: Keychain is a generic credentials storage solution, whereas the KeyStore is used to store (and can generate) cryptographic keys, either symmetric keys or public/private keys.
This means that if, for instance, you need to store a session token, on iOS you can let the OS manage the encryption part and just send your token to the Keychain, whereas on Android it’s a bit more of a manual experience because you need to generate (not hard-code, that’s bad) a key, use it to encrypt the token, store the encrypted token in SharedPreferences and store the key in the KeyStore.
There are different approaches to that, as are most things in security, but the simplest is probably to use symmetric encryption, as there is no need for public key cryptography since your app both encrypts and decrypts the token.
Obviously, you don’t need to write mobile platform-specific code that does all of that, as there is a Flutter plugin that does all of that, for instance.
The Lack Of Secure Storage On the Web
That was, actually, the reason that compelled me to write this post. I wrote about using that package to store JWT on mobile apps and people wanted the Web version of that but, as I said, there is no secure storage on the Web. It doesn’t exist.
Does that mean your JWT has to be out in the open?
No, not at all. You can use httpOnly cookies, can’t you? Those aren’t accessible by JS and are sent only to your server. The issue with that is that they’re always sent to your server, even if one of your users clicks on a GET request URL on someone else’s website and that GET request has side effects you or your user won’t like. This actually works for other request types as well, it’s just more complicated. It’s called Cross-Site Request Forgery and you don’t want that. It’s among the web security threats mentioned in Mozilla’s MDN docs, where you can find a more complete explanation.
There are prevention methods. The most common one is having two tokens, actually: one of them getting to the client as an httpOnly cookie, the other as part of the response. The latter has to be stored in localStorage and not in cookies because we don’t want it to be sent automatically to the server.
Solving Both
What if you have both a mobile app and a Web app?
That can be dealt with in one of two ways:
Use the same backend endpoint, but manually get and send the cookies using the cookie-related HTTP headers;
Create a separate non-Web backend endpoint that generates different token than either token used by the Web app and then allow for regular JWT authorization if the client is able to provide the mobile-only token.
Running Different Code On Different Platforms
Now, let’s see how we can run different code on different platforms in order to be able to compensate for the differences.
Creating A Flutter Plugin
Especially to solve the problem of storage, one way you can do that is with a plugin package: plugins provide a common Dart interface and can run different code on different platforms, including native platform-specific Kotlin/Java or Swift/Objective-C code. Developing packages and plugins is rather complex, but it’s explained in many places on the Web and elsewhere (for example in Flutter books), including the official Flutter documentation.
For mobile platforms, for instance, there already is a secure storage plugin, and that’s flutter_secure_storage, for which you can find an example of usage here, but that doesn’t work on the Web, for example.
On the other hand, for simple key-value storage that also works on the web, there’s a cross-platform Google-developed first-party plugin package called shared_preferences, which has a Web-specific component called shared_preferences_web which uses NSUserDefaults, SharedPreferences or localStorage depending on the platform.
TargetPlatform on Flutter
After importing package:flutter/foundation.dart, you can compare Theme.of(context).platform to the values:
TargetPlatform.android
TargetPlatform.iOS
TargetPlatform.linUX
TargetPlatform.windows
TargetPlatform.macOS
TargetPlatform.fuchsia
and write your functions so that, for each platform you want to support, they do the appropriate thing. This will come especially useful for the next example of platform difference, and that is differences in how widgets are displayed on different platforms.
For that use case, in particular, there is also a reasonably popular flutter_platform_widgets plugin, which simplifies the development of platform-aware widgets.
Example 2: Differences In How The Same Widget Is Displayed
You can’t just write cross-platform code and pretend a browser, a phone, a computer, and a smartwatch are the same thing — unless you want your Android and iOS app to be a WebView and your desktop app to be built with Electron. There are plenty of reasons not to do that, and it’s not the point of this piece to convince you to use frameworks like Flutter instead that keep your app native, with all the performance and user experience advantages that come with it, while allowing you to write code that is going to be the same for all platforms most of the time.
That requires care and attention, though, and at least a basic knowledge of the platforms you want to support, their actual native APIs, and all of that. React Native users need to pay even more attention to that because that framework uses the built-in OS widgets, so you actually need to pay even more attention to how the app looks by testing it extensively on both platforms, without being able to switch between iOS and Material widget on the fly like it’s possible with Flutter.
What Changes Without Your Request
There are some aspects of the UI of your app that are automatically changed when you switch platforms. This section also mentions what changes between Flutter and React Native in this respect.
Between Android And iOS (Flutter)
Flutter is capable of rendering Material widgets on iOS (and Cupertino (iOS-like) widgets on Android), but what it DOESN’T do is show exactly the same thing on Android and iOS: Material theming especially adapts to the conventions of each platform.
For instance, navigation animations and transitions and default fonts are different, but those don’t impact your app that much.
What may affect some of your choices when it comes to aesthetics or UX is the fact that some static elements also change. Specifically, some icons change between the two platforms, app bar titles are in the middle on iOS and on the left on Android (on the left of the available space in case there is a back button or the button to open a Drawer (explained here in the Material Design guidelines and also known as a hamburger menu). Here’s what a Material app with a Drawer looks like on Android:
Material app running on Android: the AppBar title is in the left side of the available space. (Large preview)
And what the same, very simple, Material app looks like on iOS:
Material app running on iOS: the AppBar title is in the middle. (Large preview)
Between Mobile and Web and With Screen Notches (Flutter)
On the Web there is a bit of a different situation, as mentioned also in this Smashing article about Responsive Web Development with Flutter: in particular, in addition to having to optimize for bigger screens and account for the way people expect to navigate through your site — which is the main focus of that article — you have to worry about the fact that sometimes widgets are placed outside of the browser window. Also, some phones have notches in the top part of their screen or other impediments to the correct viewing of your app because of some sort of obstruction.
Both of these problems can be avoided by wrapping your widgets in a SafeArea widget, which is a particular kind of padding widget which makes sure your widgets fall into a place where they can actually be displayed without anything impeding the users’ ability to see them, be it a hardware or software constraint.
In React Native
React Native requires much more attention and a much deeper knowledge of each platform, in addition to requiring you to run the iOS Simulator as well as the Android Emulator at the very least in order to be able to test your app on both platforms: it’s not the same and it converts its JavaScript UI elements to platform-specific widgets. In other words, your React Native apps will always look like iOS — with Cupertino UI elements as they are sometimes called — and your Android apps will always look like regular Material Design Android apps because it’s using the platform’s widgets.
The difference here is that Flutter renders its widgets with its own low-level rendering engine, which means you can test both app versions on one platform.
Getting Around That Issue
Unless you’re going for something very specific, your app is supposed to look different on different platforms otherwise some of your users will be unhappy.
Just like you shouldn’t simply ship a mobile app to the web (as I wrote in the aforementioned Smashing post), you shouldn’t ship an app full of Cupertino widgets to Android users, for example, because it’s going to be confusing for the most part. On the other hand, having the chance to actually run an app that has widgets that are meant for another platform allows you to test the app and show it to people in both versions without having to use two devices for that necessarily.
The Other Side: Using The Wrong Widgets For The Right Reasons
But that also means that you can do most of your Flutter development on a LinUX or Windows workstation without sacrificing the experience of your iOS users, and then just build the app for the other platform and not have to worry about thoroughly testing it.
Next Steps
Cross-platform frameworks are awesome, but they shift responsibility to you, the developer, to understand how each platform works and how to make sure your app adapts and is pleasant to use for your users. Other small things to consider may be, for example, using different descriptions for what might be in essence the same thing if there are different conventions on different platforms.
It’s great to not have to build the two (or more) apps separately using different languages, but you still need to keep in mind you are, in essence, building more than one app and that requires thinking about each of the apps you are building.
Further Resources
(ra, yk, il)
Website Design & SEO Delray Beach by DBL07.co
Delray Beach SEO
source http://www.scpie.org/solving-common-cross-platform-issues-when-working-with-flutter/ source https://scpie.tumblr.com/post/621342349322289152
0 notes
scpie · 5 years ago
Text
Solving Common Cross-Platform Issues When Working With Flutter
About The Author
Flutter and LinUX enthusiast, author of the Programming Flutter book with the Pragmatic Bookshelf. Blogs more, tweets less. More about Carmine …
When using cross-platform frameworks, people might forget the nuances of each of the platforms they want their code to run on. This article aims to address that.
I’ve seen a lot of confusion online regarding Web development with Flutter and, often, it’s sadly for the wrong reasons.
Specifically, people sometimes confuse it with the older Web-based mobile (and desktop) cross-platform frameworks, which basically were just Web pages running within browsers running within a wrapper app.
That was truly cross-platform in the sense that the interfaces were the same anyway because you only had access to the interfaces normally accessible on the Web.
Flutter isn’t that, though: it runs natively on each platform, and it means each app runs just like it would run if it were written in Java/Kotlin or Objective-C/Swift on Android and iOS, pretty much. You need to know that because this implies that you need to take care of the many differences between these very diverse platforms.
In this article, we’re going to see some of those differences and how to overcome them. More specifically, we’re going to talk about storage and UI differences, which are the ones that most often cause confusion to developers when writing Flutter code that they want to be cross-platform.
Example 1: Storage
I recently wrote on my blog about the need for a different approach to storing JWTs in Web apps when compared to mobile apps.
That is because of the different nature of the platforms’ storage options, and the need to know each and their native development tools.
Web
When you write a Web app, the storage options you have are:
downloading/uploading files to/from disk, which requires user interaction and is therefore only suitable for files meant to be read or created by the user;
using cookies, which may or may not be accessible from JS (depending on whether or not they’re httpOnly) and are automatically sent along with requests to a given domain and saved when they come as part of a response;
using JS localStorage and sessionStorage, accessible by any JS on the website, but only from JS that is part of the pages of that website.
Mobile
The situation when it comes to mobile apps is completely different. The storage options are the following:
local app documents or cache storage, accessible by that app;
other local storage paths for user-created/readable files;
NSUserDefaults and SharedPreferences respectively on iOS and Android for key-value storage;
Keychain on iOS and KeyStore on Android for secure storage of, respectively, any data and cryptographic keys.
If you don’t know that, you’re going to make a mess of your implementations because you need to know what storage solution you’re actually using and what the advantages and drawbacks are.
Cross-Platform Solutions: An Initial Approach
Using the Flutter shared_preferences package uses localStorage on the Web, SharedPreferences on Android and NSUserDefaults on iOS. Those have completely different implications for your app, especially if you’re storing sensitive information like session tokens: localStorage can be read by the client, so it’s a problem if you’re vulnerable to XSS. Even though mobile apps aren’t really vulnerable to XSS, SharedPreferences and NSUserDefaults are not secure storage methods because they can be compromised on the client side since they are not secure storage and not encrypted. That’s because they are meant for user preferences, as mentioned here in the case of iOS and here in the Android documentation when talking about the Security library which is designed to provide wrappers to the SharedPreferences specifically to encrypt the data before storing it.
Secure Storage On Mobile
The only secure storage solutions on mobile are Keychain and KeyStore on iOS and Android respectively, whereas there is no secure storage on the Web.
The Keychain and KeyStore are very different in nature, though: Keychain is a generic credentials storage solution, whereas the KeyStore is used to store (and can generate) cryptographic keys, either symmetric keys or public/private keys.
This means that if, for instance, you need to store a session token, on iOS you can let the OS manage the encryption part and just send your token to the Keychain, whereas on Android it’s a bit more of a manual experience because you need to generate (not hard-code, that’s bad) a key, use it to encrypt the token, store the encrypted token in SharedPreferences and store the key in the KeyStore.
There are different approaches to that, as are most things in security, but the simplest is probably to use symmetric encryption, as there is no need for public key cryptography since your app both encrypts and decrypts the token.
Obviously, you don’t need to write mobile platform-specific code that does all of that, as there is a Flutter plugin that does all of that, for instance.
The Lack Of Secure Storage On the Web
That was, actually, the reason that compelled me to write this post. I wrote about using that package to store JWT on mobile apps and people wanted the Web version of that but, as I said, there is no secure storage on the Web. It doesn’t exist.
Does that mean your JWT has to be out in the open?
No, not at all. You can use httpOnly cookies, can’t you? Those aren’t accessible by JS and are sent only to your server. The issue with that is that they’re always sent to your server, even if one of your users clicks on a GET request URL on someone else’s website and that GET request has side effects you or your user won’t like. This actually works for other request types as well, it’s just more complicated. It’s called Cross-Site Request Forgery and you don’t want that. It’s among the web security threats mentioned in Mozilla’s MDN docs, where you can find a more complete explanation.
There are prevention methods. The most common one is having two tokens, actually: one of them getting to the client as an httpOnly cookie, the other as part of the response. The latter has to be stored in localStorage and not in cookies because we don’t want it to be sent automatically to the server.
Solving Both
What if you have both a mobile app and a Web app?
That can be dealt with in one of two ways:
Use the same backend endpoint, but manually get and send the cookies using the cookie-related HTTP headers;
Create a separate non-Web backend endpoint that generates different token than either token used by the Web app and then allow for regular JWT authorization if the client is able to provide the mobile-only token.
Running Different Code On Different Platforms
Now, let’s see how we can run different code on different platforms in order to be able to compensate for the differences.
Creating A Flutter Plugin
Especially to solve the problem of storage, one way you can do that is with a plugin package: plugins provide a common Dart interface and can run different code on different platforms, including native platform-specific Kotlin/Java or Swift/Objective-C code. Developing packages and plugins is rather complex, but it’s explained in many places on the Web and elsewhere (for example in Flutter books), including the official Flutter documentation.
For mobile platforms, for instance, there already is a secure storage plugin, and that’s flutter_secure_storage, for which you can find an example of usage here, but that doesn’t work on the Web, for example.
On the other hand, for simple key-value storage that also works on the web, there’s a cross-platform Google-developed first-party plugin package called shared_preferences, which has a Web-specific component called shared_preferences_web which uses NSUserDefaults, SharedPreferences or localStorage depending on the platform.
TargetPlatform on Flutter
After importing package:flutter/foundation.dart, you can compare Theme.of(context).platform to the values:
TargetPlatform.android
TargetPlatform.iOS
TargetPlatform.linUX
TargetPlatform.windows
TargetPlatform.macOS
TargetPlatform.fuchsia
and write your functions so that, for each platform you want to support, they do the appropriate thing. This will come especially useful for the next example of platform difference, and that is differences in how widgets are displayed on different platforms.
For that use case, in particular, there is also a reasonably popular flutter_platform_widgets plugin, which simplifies the development of platform-aware widgets.
Example 2: Differences In How The Same Widget Is Displayed
You can’t just write cross-platform code and pretend a browser, a phone, a computer, and a smartwatch are the same thing — unless you want your Android and iOS app to be a WebView and your desktop app to be built with Electron. There are plenty of reasons not to do that, and it’s not the point of this piece to convince you to use frameworks like Flutter instead that keep your app native, with all the performance and user experience advantages that come with it, while allowing you to write code that is going to be the same for all platforms most of the time.
That requires care and attention, though, and at least a basic knowledge of the platforms you want to support, their actual native APIs, and all of that. React Native users need to pay even more attention to that because that framework uses the built-in OS widgets, so you actually need to pay even more attention to how the app looks by testing it extensively on both platforms, without being able to switch between iOS and Material widget on the fly like it’s possible with Flutter.
What Changes Without Your Request
There are some aspects of the UI of your app that are automatically changed when you switch platforms. This section also mentions what changes between Flutter and React Native in this respect.
Between Android And iOS (Flutter)
Flutter is capable of rendering Material widgets on iOS (and Cupertino (iOS-like) widgets on Android), but what it DOESN’T do is show exactly the same thing on Android and iOS: Material theming especially adapts to the conventions of each platform.
For instance, navigation animations and transitions and default fonts are different, but those don’t impact your app that much.
What may affect some of your choices when it comes to aesthetics or UX is the fact that some static elements also change. Specifically, some icons change between the two platforms, app bar titles are in the middle on iOS and on the left on Android (on the left of the available space in case there is a back button or the button to open a Drawer (explained here in the Material Design guidelines and also known as a hamburger menu). Here’s what a Material app with a Drawer looks like on Android:
Material app running on Android: the AppBar title is in the left side of the available space. (Large preview)
And what the same, very simple, Material app looks like on iOS:
Material app running on iOS: the AppBar title is in the middle. (Large preview)
Between Mobile and Web and With Screen Notches (Flutter)
On the Web there is a bit of a different situation, as mentioned also in this Smashing article about Responsive Web Development with Flutter: in particular, in addition to having to optimize for bigger screens and account for the way people expect to navigate through your site — which is the main focus of that article — you have to worry about the fact that sometimes widgets are placed outside of the browser window. Also, some phones have notches in the top part of their screen or other impediments to the correct viewing of your app because of some sort of obstruction.
Both of these problems can be avoided by wrapping your widgets in a SafeArea widget, which is a particular kind of padding widget which makes sure your widgets fall into a place where they can actually be displayed without anything impeding the users’ ability to see them, be it a hardware or software constraint.
In React Native
React Native requires much more attention and a much deeper knowledge of each platform, in addition to requiring you to run the iOS Simulator as well as the Android Emulator at the very least in order to be able to test your app on both platforms: it’s not the same and it converts its JavaScript UI elements to platform-specific widgets. In other words, your React Native apps will always look like iOS — with Cupertino UI elements as they are sometimes called — and your Android apps will always look like regular Material Design Android apps because it’s using the platform’s widgets.
The difference here is that Flutter renders its widgets with its own low-level rendering engine, which means you can test both app versions on one platform.
Getting Around That Issue
Unless you’re going for something very specific, your app is supposed to look different on different platforms otherwise some of your users will be unhappy.
Just like you shouldn’t simply ship a mobile app to the web (as I wrote in the aforementioned Smashing post), you shouldn’t ship an app full of Cupertino widgets to Android users, for example, because it’s going to be confusing for the most part. On the other hand, having the chance to actually run an app that has widgets that are meant for another platform allows you to test the app and show it to people in both versions without having to use two devices for that necessarily.
The Other Side: Using The Wrong Widgets For The Right Reasons
But that also means that you can do most of your Flutter development on a LinUX or Windows workstation without sacrificing the experience of your iOS users, and then just build the app for the other platform and not have to worry about thoroughly testing it.
Next Steps
Cross-platform frameworks are awesome, but they shift responsibility to you, the developer, to understand how each platform works and how to make sure your app adapts and is pleasant to use for your users. Other small things to consider may be, for example, using different descriptions for what might be in essence the same thing if there are different conventions on different platforms.
It’s great to not have to build the two (or more) apps separately using different languages, but you still need to keep in mind you are, in essence, building more than one app and that requires thinking about each of the apps you are building.
Further Resources
(ra, yk, il)
Website Design & SEO Delray Beach by DBL07.co
Delray Beach SEO
source http://www.scpie.org/solving-common-cross-platform-issues-when-working-with-flutter/
0 notes
vegas-glitz · 5 years ago
Text
8 Computing Remedies at the Forefront of the New Overall economy
http://topicsofnote.com/?p=7802&utm_source=SocialAutoPoster&utm_medium=Social&utm_campaign=Tumblr
In modern moments, the standard economy and the electronic overall economy has been uncovered to new and thrilling systems that assure a additional decentralized, secure, and quick community for customers. In this posting, I have incorporated some of the main gamers in this establishing sector.
1. Golem
Golem is an open-supply, decentralized personal computer network.
How Golem Will work
The Golem Community is a current market for computing ability, the place people can make from 'renting' their equipment or by building and offering software.
Inside the community, users renting computing electric power are identified as "companies" and buyers attaining energy are known as "requestors." The requestors make use of Golem for numerous purposes, which includes graphics processing, knowledge analysis, microservices, and device studying.
Added benefits
The function division implies that tasks can be finished at the same time, hence enabling shorter timelines for assignments.
The expense of doing enterprise is considerably less than cloud-dependent solutions.
Users can be quickly compensated for their get the job done with the Golem Network Token (GTM), a token on Ethereum blockchain.
Golem is building their complete stack from bottom to leading, an solution that generally effects in great UXs.
2. iExec
IExec is a decentralized marketplace for cloud companies concentrated on blockchain-centered dispersed apps and reasonably priced, higher-effectiveness computing.
iExecc Dapps
Compared with Golem, iExec (because the launch of its v1) enables any individual to develop and run apps.
The iExecc Dapp retailer incorporates a range of apps. Taking into consideration the professional crew driving iExec, their reason to decide on the Dapp pathway is that you will find probably significantly less level of competition listed here. Soon after establishing themselves in the decentralized Dapp sector, iExec programs on growing into decentralized computing tasks.
RLC
RLC is brief for 'Runs on Tons of Desktops,' and it's the indigenous token of iExec. There are now 87 million of the ERC-20 token in circulation.
3. Ethereum
Ethereum is an open-supply, blockchain-primarily based system that allows end users to establish decentralized apps. The computations are performed in an isolated atmosphere called Ethereum Virtual Equipment that resides in all node linked on the network. The merchandise of the computations is stored on the blockchain.
Options of the Ethereum Blockchain
Ether
Ether is the currency of the Ethereum blockchain. The cryptocurrencies ETH (Ethereum Challenging Fork) and Etc (Ethereum Basic) are two values of Ether.
Smart Contract
The EVM is capable of executing a "sensible get in touch with," an algorithm that stores and mechanically executes terms of agreements. Each events involved in a transaction agree to the terms published in the intelligent deal.
Bitcoin vs Ethereum System
The Bitcoin blockchain focuses on a set of pre-described operations, these as tracking Bitcoin transactions, even though Ethereum makes it possible for consumers to operate code of any complexity, creating it ideal for any decentralized application, together with cryptocurrencies.
Consensus System
Computation on the Ethereum community cost more and take more time than a typical computer system simply because of the parallelization of computing. To sustain consensus, all participants should agree above the get of all transactions that have taken position, no matter if they have taken portion in the transaction or not.
Ethereum nodes shop the most recent condition of every sensible agreement, alongside with all of the Ether transactions. As EVM is an isolated program, the code runs without having access to the network or the filesystem. So, you will find minimal accessibility even amid wise contracts.
4. Hyperledger Fabric
Hosted by the Linux Foundation, Hyperledger Cloth is an open up source distributed ledger know-how (DLT) obtaining a modular and configurable architecture that can be utilized at the business stage in various industries.
Features of Hyperledger Fabric
Privacy, Development, and Performance
The Fabric platform enables permissioned, personal procedure exactly where the operators know every single other and can be...bound by principles, these types of as a authorized arrangement.
Fabric supports good contracts published in popular languages, this sort of as Java and Go, so no supplemental coaching is expected to generate the smart contracts.
Functionality is enhanced mainly because, compared with Ethereum, only parties taking portion in the transaction have to arrive at consensus.
Material Nodes
Also unlike Ethereum, Fabric nodes have distinct roles and duties in the consensus approach. The nodes can be orderers, purchasers, or friends.
Indigenous Forex
Material does not have a indigenous cryptocurrency. On the other hand, chaincode can be employed to create a indigenous currency.
5. Tendermint
Tendermint has a blockchain consensus motor, recognised as Tendermint Core, and a generic application interface, acknowledged as Software Blockchain Interface (ABCI). The software program enables protected and steady replication of an application on numerous devices.
Tendermint Core
The Byzantine Fault Tolerant (BFT) middleware of the consensus engine can securely replicate condition transition equipment. BFT middleware can tolerate just one-3rd of failures, such as hacking assaults.
Tendermint had the goal of offering a a lot more secure and effective consensus algorithm than Bitcoin's PoW (Evidence of Perform). The software formed the basis of vital study by consensus protocol Casper's workforce: a fault-tolerant chain, these types of as Tendermint, can make fantastic conclusions about who creates a block, whilst a less dependable chain results in a rooster and egg issue.
The application is user-friendly, replicates applications penned in any language, and has numerous apps.
6. Lisk
Lisk is a decentralized and distributed system that permits people to create applications and support them with custom-made blockchains.
Lisk Capabilities
Developers can use Lisk's JavaScript-based mostly application improvement package (SDK) to develop the two the backend and the frontend of their application. Nevertheless, Lisk isn't going to present security towards non-deterministic actions. Also, the platform are not able to prevent infinite loops and measure memory intake.
Lisk's Consensus System
Lisk asks builders to abide by "policies" for contracts to be certain consensus. For occasion, they talk to builders to "will not use Math.random()."
7. Corda (V 3.)
Corda is an open supply, distributed ledger platform (DLT) catering to the money sector.
Features of Corda
Corda's community is a permissioned network - it truly is not open up to all node operators. The nodes run on Corda and CoDapps and converse level-to-point with just about every other.
The 'doorman' of each network sets the admission regulations for nodes that want to join the community. Like Fabric, Corda presents a lot more privateness due to the fact of its good-grained entry manage to documents, and improved permeance for the reason that of limiting consensus to the concerned get-togethers.
On Corda, deal builders also include authorized prose to their agreement. This feature consolidates the contract by legitimizing it with the related legal prose. The system does not have a indigenous token.
8. Rootstock
Rootstock (RSK) is an open up supply good-contract system that is constructed on the Bitcoin blockchain.
Rootstock Characteristics
Wise Contracts
RSK is enabling wise contract on the Bitcoin network. It utilizes the Turing-full Rootstock Virtual Device (RVM) for wise contracts. A 2-way peg enables customers to straight send Bitcoin on to the Rootstock chain. The RSK coins can be made use of with intelligent contracts and Dapps. RSK contracts replicate 'Proof-of-Existence,' which is made use of to confirm the existence of a document (or assets appropriate).
Stability
The RSK blockchain characteristics merge-mining, supplying it the identical stage of safety as Bitcoin in phrases of settlement finality and double-expending.
SBTC
RSK is a sidechain of Bitcoin. The Bitcoins on the Rootstock blockchain are known as SBTC.
RSK is filling the gaps in the Bitcoin network by enabling more quickly transactions. Moreover getting handy for buyers, it also helps to keep the Bitcoin block sizing in just boundaries.
Source by Sal J
0 notes