8000 πŸ“š Mobile v1.1 Documentation Updates by shanerbaner82 Β· Pull Request #178 Β· NativePHP/nativephp.com Β· GitHub
[go: up one dir, main page]

Skip to content

πŸ“š Mobile v1.1 Documentation Updates #178

New issue
8000

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

shanerbaner82
Copy link
Contributor

Summary

Comprehensive updates to mobile v1.1 documentation improving structure, content, and developer experience.

Key Changes

  • πŸ—‚οΈ Reorganized documentation structure with dedicated APIs and concepts sections
  • πŸ”’ Added comprehensive database security guidance covering API-first architecture, Laravel Sanctum integration, and SecureStorage best practices
  • ⚑ Simplified Haptics API documentation to essential examples and usage patterns
  • πŸͺŸ Added Windows performance tip for faster composer installs during compilation
  • πŸ“ Enhanced geolocation documentation with detailed event handling examples
  • βš™οΈ Updated installation guide with platform-specific o 8000 ptimizations

Documentation Structure Changes

  • Moved API references to dedicated /apis/ section
  • Created /concepts/ section for architectural guidance
  • Reorganized content hierarchy for better navigation
  • Added cross-references between related topics

Security Improvements

  • Explained why MySQL/PostgreSQL drivers are intentionally excluded
  • Provided detailed guidance on secure API communication patterns
  • Demonstrated proper token storage using SecureStorage API
  • Added Laravel Sanctum integration examples

Developer Experience

  • Reduced verbose documentation where appropriate (Haptics API)
  • Added practical code examples throughout
  • Improved Windows development workflow with Defender exclusion tip
  • Enhanced error handling and best practices guidance

All changes maintain backward compatibility and improve the overall documentation quality for mobile v1.1 developers.

- Reorganize v1.1 documentation with new APIs and concepts sections
- Add comprehensive database security guidance covering API-first architecture, Laravel Sanctum integration, and SecureStorage best practices
- Simplify Haptics API documentation to essential examples and usage patterns
- Add Windows performance tip for faster composer installs during compilation
- Improve geolocation API documentation with detailed event handling
- Update installation guide with platform-specific optimizations
- Restructure v1.1 content hierarchy for better developer experience
@shanerbaner82 shanerbaner82 requested a review from simonhamp July 7, 2025 02:33
- Merge installation.md: preserve platform requirements from main + Windows performance tip
- Update ShowDocumentationController.php with latest changes
Copy link
Member
@PeteBishwhip PeteBishwhip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good. I'm concerned about the amount of "Old way - Don't do this" kind of docs we have here. I think instead, as I mentioned on this comments we should update the codebase and throw:

user_error('System::camera() should not longer be used. See {{$docLink}} for more information.', E_USER_DEPRECATED);

I think that's smarter else if someone struggles with a correct method, they might just backtrack to old deprecated and unsupported code.

Otherwise, great work man!

@@ -65,7 +64,8 @@ protected function getPageProperties($platform, $version, $page = null): array
$pageProperties = $document->matter();

$versionProperties = YamlFrontMatter::parseFile(resource_path("views/docs/{$platform}/{$version}/_index.md"));
$pageProperties = array_merge($pageProperties, $versionProperties->matter());

$pageProperties = array_merge($versionProperties->matter(), $pageProperties);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily an issue but can you help me understand why the order of arguments were switched here? Was something being overwritten we wasn't expecting? πŸ‘€

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually yeah, and maybe you can verify, locally for me every page showed "Mobile" as the title of the document, reversing this fixed it for me. On the website currently it works fine now, not sure what's going on tbh and I didn't switch it back.


## What Makes NativePHP Mobile Special?

=€ **Native Performance** - Your app runs natively on device with embedded PHP runtime
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just a GitHub display issue or are these characters genuinely not meant to be here?

## Migration from System Facade

```php
// Old way (deprecated)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think we should no longer document the "old way" at all. Instead, in the project itself, we should throw a deprecation warning to bubble this up.

## Migration from System Facade

```php
// Old way (deprecated)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I really think we shouldn't document it otherwise bad-practices form.

Lets throw a deprecation in the code!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't throw just add the doc blocks so IDE's know - it will still work.

If you were using the deprecated `System::secureSet()` and `System::secureGet()` methods:

```php
// Old way (deprecated)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lose it. Throw deprecation :D

shanerbaner82 and others added 2 commits July 7, 2025 09:38
Co-authored-by: Peter Bishop <9081809+PeteBishwhip@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0